From f19a1441b3c7529df10c07000b637da236a07a37 Mon Sep 17 00:00:00 2001 From: FaizHashmi Date: Wed, 14 Oct 2026 13:08:32 +0300 Subject: [PATCH] url change --- lib/classes/consts.dart | 4 +- lib/ui/login/forgot_password_screen.dart | 64 +++++++++++------------- 2 files changed, 30 insertions(+), 38 deletions(-) diff --git a/lib/classes/consts.dart b/lib/classes/consts.dart index e3463788..a66b657d 100644 --- a/lib/classes/consts.dart +++ b/lib/classes/consts.dart @@ -4,12 +4,12 @@ class ApiConsts { // static String baseUrl = "http://10.201.214.101:2027"; // Local server // static String baseUrl = "https://erptstapp.srca.org.sa"; // SRCA server - static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver + // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver // static String baseUrl = "http://10.201.204.101:2024"; // static String baseUrl = "https://webservices.hmg.com"; // PreProd // static String baseUrl = "https://hmgwebservices.com"; // Live server - // static String baseUrl = "https://mohemm.hmg.com"; // New Live server + static String baseUrl = "https://mohemm.hmg.com"; // New Live server static String ssoBaseUrl = "https://sso.hmg.com"; // New Live server // // static String baseUrl = "https://uat.hmgwebservices.com"; // UAT ser343622ver diff --git a/lib/ui/login/forgot_password_screen.dart b/lib/ui/login/forgot_password_screen.dart index b2d5c929..d95ef207 100644 --- a/lib/ui/login/forgot_password_screen.dart +++ b/lib/ui/login/forgot_password_screen.dart @@ -50,29 +50,27 @@ class _ForgotPasswordScreenState extends State { context, 1, int.tryParse(_basicMemberInformation?.pMOBILENUMBER ?? ""), - (value,TextEditingController _pinPutController) async { + (value, TextEditingController _pinPutController) async { Utils.showLoading(context); - try{ - GenericResponseModel? genericResponseModel = await LoginApiClient().checkPublicActivationCode(value, employeeId.text); - if (genericResponseModel?.errorMessage != null) { - Utils.showToast(genericResponseModel?.errorMessage ?? ""); - return; - } - Utils.hideLoading(context); - await Navigator.pushNamed(context, AppRoutes.newPassword, arguments: employeeId.text); - Navigator.pop(context); - Navigator.pop(context); - }catch(ex){ - print(ex); - _pinPutController.clear(); - otpFieldClear.value = ""; - Utils.hideLoading(context); - Utils.handleException(ex, context, null); - } - }, - () => { - Navigator.pop(context), + try { + GenericResponseModel? genericResponseModel = await LoginApiClient().checkPublicActivationCode(value, employeeId.text); + if (genericResponseModel?.errorMessage != null) { + Utils.showToast(genericResponseModel?.errorMessage ?? ""); + return; + } + Utils.hideLoading(context); + await Navigator.pushNamed(context, AppRoutes.newPassword, arguments: employeeId.text); + Navigator.pop(context); + Navigator.pop(context); + } catch (ex) { + print(ex); + _pinPutController.clear(); + otpFieldClear.value = ""; + Utils.hideLoading(context); + Utils.handleException(ex, context, null); + } }, + () => {Navigator.pop(context)}, onResendCode: () { performForgotPassword(); }, @@ -87,13 +85,7 @@ class _ForgotPasswordScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - backgroundColor: Colors.transparent, - leading: IconButton( - icon: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor), - onPressed: () => Navigator.pop(context), - ), - ), + appBar: AppBar(backgroundColor: Colors.transparent, leading: IconButton(icon: const Icon(Icons.arrow_back_ios, color: MyColors.darkIconColor), onPressed: () => Navigator.pop(context))), body: Column( children: [ //const SizedBox(height: 23), @@ -122,19 +114,19 @@ class _ForgotPasswordScreenState extends State { ), ], ), - ) + ), ], ), ), ), DefaultButton( - LocaleKeys.changePassword.tr(), - employeeId.text.isEmpty - ? null - : () async { - performForgotPassword(); - }) - .insideContainer + LocaleKeys.changePassword.tr(), + employeeId.text.isEmpty + ? null + : () async { + performForgotPassword(); + }, + ).insideContainer, ], ), );