diff --git a/lib/ui/screens/registration_screen.dart b/lib/ui/screens/registration_screen.dart index 1b16805..5f9d250 100644 --- a/lib/ui/screens/registration_screen.dart +++ b/lib/ui/screens/registration_screen.dart @@ -167,7 +167,7 @@ class _RegistrationScreenState extends State { SizedBox(width: 8), Expanded( child: Text( - "أقر بأني إطلعت على شروط الاستخدام و سياسية الخصوصية و أوافق عليها", + "أقر بأن جميع البيانات المدخلة أعلاه صحيحة", style: TextStyle(color: Colors.white, fontSize: 13), ), ), @@ -179,6 +179,10 @@ class _RegistrationScreenState extends State { height: 50, child: TextButton( onPressed: () { + if (_emailController.text.length < 1) { + Utils.showToast("يرجى إدخال البريد الإلكتروني"); + return; + } if (_firstNameController.text.length < 1) { Utils.showToast("يرجى إدخال الاسم الأول"); return; @@ -187,10 +191,6 @@ class _RegistrationScreenState extends State { Utils.showToast("يرجى إدخال الاسم الأخير"); return; } - if (_emailController.text.length < 1) { - Utils.showToast("يرجى إدخال البريد الإلكتروني"); - return; - } if (_selectedCountry?.countryCode == null) { Utils.showToast("يرجى اختيار الدولة"); return; @@ -198,6 +198,9 @@ class _RegistrationScreenState extends State { if (_mobileNumberController.text.length < 1) { Utils.showToast("يرجى إدخال رقم الجوال"); return; + } else if (_mobileNumberController.text.length < 8 || _mobileNumberController.text.length > 12) { + Utils.showToast("رقم الهاتف غير صحيح"); + return; } if (_passwordController.text.length < 1) { Utils.showToast("يرجى إدخال كلمة المرور"); @@ -226,8 +229,8 @@ class _RegistrationScreenState extends State { _firstNameController.text, _lastNameController.text, _emailController.text, _passwordController.text, _selectedCountry?.countryCode, _mobileNumberController.text); }, style: TextButton.styleFrom( - primary: Colors.white, backgroundColor: ColorConsts.secondaryPink, + foregroundColor: Colors.white, textStyle: TextStyle(fontSize: 16, fontFamily: "DroidKufi"), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(6.0), diff --git a/lib/ui/screens/tangheem_detail_screen.dart b/lib/ui/screens/tangheem_detail_screen.dart index 3259884..41fc617 100644 --- a/lib/ui/screens/tangheem_detail_screen.dart +++ b/lib/ui/screens/tangheem_detail_screen.dart @@ -524,7 +524,7 @@ class _TangheemDetailScreenState extends State { ), style: TextButton.styleFrom( backgroundColor: ColorConsts.gradientOrange, - primary: ColorConsts.primaryBlue, + foregroundColor: ColorConsts.primaryBlue, padding: EdgeInsets.only(top: 4, bottom: 4, right: 8, left: 8), textStyle: TextStyle(color: Colors.white, fontSize: 12), ), @@ -843,7 +843,7 @@ class _TangheemDetailScreenState extends State { borderRadius: BorderRadius.circular(30), onTap: () async { if (!AppState().isUserLogin) { - Widget cancelButton = FlatButton( + Widget cancelButton = TextButton(style: TextButton.styleFrom(backgroundColor: ColorConsts.sliderBackground,foregroundColor: ColorConsts.primaryBlack), child: Text("أرغب بالتسجيل"), onPressed: () async { Navigator.pop(context); @@ -853,22 +853,21 @@ class _TangheemDetailScreenState extends State { } }, ); - Widget continueButton = FlatButton( + Widget continueButton = TextButton(style: TextButton.styleFrom(backgroundColor: ColorConsts.sliderBackground,foregroundColor: ColorConsts.primaryBlack), child: Text("استمرار كضيف"), onPressed: () { Navigator.pop(context); return; }, ); - AlertDialog alert = AlertDialog( content: Text("هذه الخاصية متاحه فقط للأعضاء المسجلين"), + actionsAlignment:MainAxisAlignment.spaceEvenly, actions: [ cancelButton, continueButton, ], ); - showDialog( context: context, builder: (BuildContext context) {