register page merge done
This commit is contained in:
commit
0d4c3cf02e
@ -15,12 +15,12 @@ import 'package:uae_stat/presentation/components/indicators/locale_provider.dart
|
||||
import '../../components/my_toggle.dart';
|
||||
import '../../routes/auth_routes/login_route.dart';
|
||||
|
||||
class RegisterScreen extends StatefulWidget {
|
||||
class RegisterScreen extends ConsumerStatefulWidget {
|
||||
@override
|
||||
_RegisterScreenState createState() => _RegisterScreenState();
|
||||
}
|
||||
|
||||
class _RegisterScreenState extends State<RegisterScreen> {
|
||||
class _RegisterScreenState extends ConsumerState<RegisterScreen> {
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
final _usernameController = TextEditingController();
|
||||
final _emailController = TextEditingController();
|
||||
@ -311,6 +311,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
Widget build(BuildContext context) {
|
||||
double screenheight = MediaQuery.of(context).size.height;
|
||||
double screenwidth = MediaQuery.of(context).size.width;
|
||||
final registerLocale = ref.watch(localeProvider);
|
||||
|
||||
Widget buildIconContainer(IconData icon, Color iconColor) {
|
||||
return Container(
|
||||
@ -336,9 +337,14 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
actions: [
|
||||
Consumer(
|
||||
|
||||
body:
|
||||
|
||||
Column(
|
||||
children: [
|
||||
Align(
|
||||
alignment: AlignmentDirectional.topEnd,
|
||||
child: Consumer(
|
||||
builder: (context, ref, _) {
|
||||
final locale = ref.watch(localeProvider); // Current locale
|
||||
return MyToggle(
|
||||
@ -361,11 +367,14 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
// );
|
||||
},
|
||||
),
|
||||
],
|
||||
backgroundColor: Colors.white,
|
||||
),
|
||||
backgroundColor: Colors.white,
|
||||
body: registrationSuccess
|
||||
Container(
|
||||
height: MediaQuery.of(context).size.height/1.2,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children : [
|
||||
|
||||
registrationSuccess
|
||||
? Padding(
|
||||
padding: const EdgeInsets.all(20.0),
|
||||
child: Column(
|
||||
@ -480,6 +489,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
: Form(
|
||||
key: _formKey,
|
||||
child: SingleChildScrollView(
|
||||
@ -562,7 +572,9 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
width: 1), // Match the error color
|
||||
),
|
||||
counterText: '',
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB)),
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB),
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 14 : 16,
|
||||
),
|
||||
),
|
||||
validator: _validateUsername,
|
||||
maxLength:
|
||||
@ -632,7 +644,9 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
width: 1), // Match the error color
|
||||
),
|
||||
counterText: '',
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB)),
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB),
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 14 : 16,
|
||||
),
|
||||
),
|
||||
validator: _validateEmail,
|
||||
maxLength: 320,
|
||||
@ -735,7 +749,9 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
),
|
||||
|
||||
counterText: '',
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB)),
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB),
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 14 : 16,
|
||||
),
|
||||
),
|
||||
validator: _validatePassword,
|
||||
maxLength: 40,
|
||||
@ -824,7 +840,9 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
width: 1), // Match the error color
|
||||
),
|
||||
counterText: '',
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB)),
|
||||
hintStyle: TextStyle(color: Color(0xFFC3C6CB),
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 14 : 16,
|
||||
),
|
||||
),
|
||||
validator: _validateConfirmPassword,
|
||||
maxLength: 40,
|
||||
@ -873,7 +891,8 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
.terms_conditions,
|
||||
// text: 'Terms & Conditions',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 12 : 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color(0xFF985400),
|
||||
// Makes the text bold
|
||||
// decoration:
|
||||
@ -891,8 +910,8 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
text: AppLocalizations.of(context)!
|
||||
.privacy_policy,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 12 : 14,
|
||||
fontFamily: 'Roboto',
|
||||
color: Color(0xFF985400),
|
||||
// decoration:
|
||||
@ -924,7 +943,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
'Required',
|
||||
style: TextStyle(
|
||||
color: Color(0xFFb22222),
|
||||
fontSize: 12,
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 12 : 14,
|
||||
),
|
||||
),
|
||||
),
|
||||
@ -953,7 +972,8 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
AppLocalizations.of(context)!
|
||||
.register_title,
|
||||
style: TextStyle(
|
||||
fontSize: 16, color: Colors.white),
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 14 : 16,
|
||||
color: Colors.white),
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
const Icon(
|
||||
@ -970,7 +990,8 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
Text(
|
||||
AppLocalizations.of(context)!.account_confirmation,
|
||||
style: TextStyle(
|
||||
fontSize: 14, color: Colors.grey[600]),
|
||||
fontSize: registerLocale?.languageCode == 'ar' ? 12 : 14,
|
||||
color: Colors.grey[600]),
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
Padding(
|
||||
@ -1052,6 +1073,11 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -145,7 +145,7 @@ class LoginRoute extends HookConsumerWidget {
|
||||
'إعادة تعيين كلمة المرور',
|
||||
),
|
||||
style: TextStyle(
|
||||
fontSize: 20,
|
||||
fontSize: locale?.languageCode == 'ar' ? 18 : 20,
|
||||
color: Color(0xFF898C81),
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
@ -160,7 +160,7 @@ class LoginRoute extends HookConsumerWidget {
|
||||
'عنوان البريد الإلكتروني',
|
||||
),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16,
|
||||
fontSize: locale?.languageCode == 'ar' ? 13 : 16,
|
||||
color: Color(0xFF898C81), // For label text color
|
||||
// fontWeight: FontWeight.w600,
|
||||
),
|
||||
@ -254,10 +254,10 @@ class LoginRoute extends HookConsumerWidget {
|
||||
style: TextStyle(
|
||||
fontFamily: context.translate(
|
||||
'Roboto',
|
||||
'NotoKufi',
|
||||
'Roboto',
|
||||
),
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
fontSize: locale?.languageCode == 'ar' ? 12 : 14,
|
||||
color: Color(0xFF985400),
|
||||
),
|
||||
),
|
||||
@ -418,9 +418,9 @@ class LoginRoute extends HookConsumerWidget {
|
||||
TextStyle(
|
||||
fontFamily: context.translate(
|
||||
'Roboto',
|
||||
'NotoKufi',
|
||||
'Roboto',
|
||||
),
|
||||
fontSize: 16,
|
||||
fontSize: locale?.languageCode == 'ar' ? 14 : 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
),
|
||||
@ -442,6 +442,14 @@ class LoginRoute extends HookConsumerWidget {
|
||||
'Login',
|
||||
'تسجيل الدخول',
|
||||
),
|
||||
style: TextStyle(
|
||||
fontFamily: context.translate(
|
||||
'Roboto',
|
||||
'Roboto',
|
||||
),
|
||||
fontSize: locale?.languageCode == 'ar' ? 16: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
)
|
||||
),
|
||||
6.horizontalSpace,
|
||||
const Icon(
|
||||
@ -511,9 +519,9 @@ class LoginRoute extends HookConsumerWidget {
|
||||
style: TextStyle(
|
||||
fontFamily: context.translate(
|
||||
'Roboto',
|
||||
'NotoKufi',
|
||||
'Roboto',
|
||||
),
|
||||
fontSize: 40,
|
||||
fontSize: locale?.languageCode == 'ar' ? 38 : 40,
|
||||
fontWeight: FontWeight.w300,
|
||||
),
|
||||
),
|
||||
@ -527,7 +535,7 @@ class LoginRoute extends HookConsumerWidget {
|
||||
style: TextStyle(
|
||||
fontFamily: context.translate(
|
||||
'Roboto',
|
||||
'NotoKufi',
|
||||
'Roboto',
|
||||
),
|
||||
fontSize: context.translate(18.0, 14.0),
|
||||
color: const Color(0xff898C81),
|
||||
@ -544,9 +552,9 @@ class LoginRoute extends HookConsumerWidget {
|
||||
style: TextStyle(
|
||||
fontFamily: context.translate(
|
||||
'Roboto',
|
||||
'NotoKufi',
|
||||
'Roboto',
|
||||
),
|
||||
fontSize: 14,
|
||||
fontSize: locale?.languageCode == 'ar' ? 12 : 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
children: [
|
||||
|
||||
Loading…
Reference in New Issue
Block a user