From bf68f31227829acf1a61a3430e1cc94013bb5e0f Mon Sep 17 00:00:00 2001 From: Fatimah Alshammari Date: Thu, 7 Apr 2022 13:09:31 +0300 Subject: [PATCH] fix issues --- lib/classes/utils.dart | 2 +- lib/pages/user/forget_password_page.dart | 4 ++-- lib/pages/user/register_page.dart | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/classes/utils.dart b/lib/classes/utils.dart index 0a6c528..9011d5c 100644 --- a/lib/classes/utils.dart +++ b/lib/classes/utils.dart @@ -11,7 +11,7 @@ class Utils { static void showToast(String message) { Fluttertoast.showToast( - msg: message, toastLength: Toast.LENGTH_SHORT, gravity: ToastGravity.BOTTOM, timeInSecForIosWeb: 1, backgroundColor: Colors.black54, textColor: Colors.white, fontSize: 16.0); + msg: message, toastLength: Toast.LENGTH_SHORT, gravity: ToastGravity.BOTTOM, timeInSecForIosWeb: 2, backgroundColor: Colors.black54, textColor: Colors.white, fontSize: 16.0); } static dynamic getNotNullValue(List list, int index) { diff --git a/lib/pages/user/forget_password_page.dart b/lib/pages/user/forget_password_page.dart index 71236b1..4c919aa 100644 --- a/lib/pages/user/forget_password_page.dart +++ b/lib/pages/user/forget_password_page.dart @@ -96,9 +96,9 @@ class _ForgetPasswordPageState extends State { title: "Continue", width: double.infinity, onPressed: () { - if (userName.isNum() && type==ClassType.NUMBER) { + if (userName.isNum() && !userName.isValidEmail() && type==ClassType.NUMBER) { forgetPasswordPhoneOTP(context); - } else if (!userName.isNum() && type==ClassType.EMAIL) { + } else if (userName.isValidEmail() && type==ClassType.EMAIL) { forgetPasswordEmailOTP(context); } }, diff --git a/lib/pages/user/register_page.dart b/lib/pages/user/register_page.dart index fd17b8f..f8cc286 100644 --- a/lib/pages/user/register_page.dart +++ b/lib/pages/user/register_page.dart @@ -64,7 +64,7 @@ class RegisterPage extends StatelessWidget { return DropdownField((DropValue value) { countryCode = value.subValue; countryId = value.id; - }, list: dropList, hint: "Chose Country"); + }, list: dropList, hint: "Select Country"); } else { return CircularProgressIndicator(); }