import 'package:flutter/material.dart'; import '../../../config/custom_text.dart'; import '../../../utils/colors.dart'; import '../../../widgets/custom_button.dart'; import 'Registration/InputLabel.dart'; class AddRefCodeScreen extends StatefulWidget { final Function(String)? onContinue; const AddRefCodeScreen({ Key? key, this.onContinue, }) : super(key: key); @override _AddRefCodeScreenState createState() => _AddRefCodeScreenState(); } class _AddRefCodeScreenState extends State { final TextEditingController _controller = TextEditingController(); bool isArabic = false; @override void initState() { super.initState(); } //onContinue @override void dispose() { _controller.dispose(); super.dispose(); } @override Widget build(BuildContext context) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ const SizedBox(height: 40), Txt( text: "Referral Code", style: TextStyle( color: Colors.black, fontSize: 28, fontFamily: isArabic ? "Readex_Pro" : 'Inter', fontWeight: FontWeight.w700, ), ), const SizedBox(height: 8), Txt( text: "Add Your Referral Code", style: TextStyle( color: const Color(0xFF8C929C), fontSize: 16, fontFamily: isArabic ? "Readex_Pro" : 'Inter', fontWeight: FontWeight.w400, ), ), const SizedBox(height: 32), const InputLabel(text: "Referral Code"), const SizedBox(height: 8), TextField( controller: _controller, keyboardType: TextInputType.number, decoration: InputDecoration( hintText: "Code", hintStyle: TextStyle( color: AppNewColors.inputTextColor, fontSize: 16, fontFamily: isArabic ? "Readex_Pro" : 'Inter', fontWeight: FontWeight.w400, ), prefixIcon: const Icon(Icons.numbers, color: Color(0xFF5B616D)), filled: true, fillColor: const Color(0xFFF5F5F5), border: OutlineInputBorder( borderRadius: BorderRadius.circular(12), borderSide: BorderSide.none, ), contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 13), ), ), const SizedBox(height: 24), CustomButton( onClick: () => widget.onContinue != null ? widget.onContinue!(_controller.text): null, fontSize: 14, width: double.infinity, height: 40, borderRadius: 10, txtColor: AppNewColors.white, title: 'Next', backgroundColor: AppNewColors.primaryBtnColor, borderColor: AppNewColors.primaryBtnColor ), ], ); } }