From df4d01ee6e8e8f9068a5df73385a9760c474897c Mon Sep 17 00:00:00 2001 From: "sanjeev.p" Date: Mon, 16 Feb 2026 09:28:04 +0530 Subject: [PATCH] FIX_TrackerAssigned --- lib/pages/email_verify.dart | 4 +- lib/pages/enrollment/empDetails.dart | 3 +- lib/pages/login.dart | 65 +++++++++++++--------------- 3 files changed, 35 insertions(+), 37 deletions(-) diff --git a/lib/pages/email_verify.dart b/lib/pages/email_verify.dart index 6ed1791..c19d44e 100755 --- a/lib/pages/email_verify.dart +++ b/lib/pages/email_verify.dart @@ -1269,8 +1269,8 @@ class _MyEmailVerifyState extends State { // ), SizedBox( height: Responsive.isDesktop(context) - ? _size.height * 0.3 - : _size.height * 0.2, + ? _size.height * 0.4 + : _size.height * 0.3, ), // SizedBox( // height: _size.height * 0.1, diff --git a/lib/pages/enrollment/empDetails.dart b/lib/pages/enrollment/empDetails.dart index a3f42db..22ad043 100755 --- a/lib/pages/enrollment/empDetails.dart +++ b/lib/pages/enrollment/empDetails.dart @@ -2636,7 +2636,8 @@ class _empDetailsState extends State { children: familyFloaterContainers, ), // Add Family Member Button HERE - if (gmcOpenForEnrollment != 0 && gmcECardDownload == null)...[ + // if (gmcOpenForEnrollment != 0 && gmcECardDownload == null)...[ + if(gmcOpenForEnrollment != 0 && gmcECardDownload == null && getFalseObjects.isNotEmpty)...[ GestureDetector( onTap: () { if (getFalseObjects.length == 0) { diff --git a/lib/pages/login.dart b/lib/pages/login.dart index 4d794a1..d7a7183 100755 --- a/lib/pages/login.dart +++ b/lib/pages/login.dart @@ -664,6 +664,14 @@ class _loginState extends State { clickedForgotPassword = true; passwordController.text = ''; passwordController.clear(); + + // ✅ Clear everything so the flow starts fresh + emailController.clear(); + _otpController.clear(); + resetPasswordController.clear(); + confirmPasswordController.clear(); + + _formKey.currentState?.reset(); }); } @@ -774,8 +782,17 @@ class _loginState extends State { otpValueStatus = false; otpFieldShow = false; clickedForgotPassword = false; - resetPasswordEnable = true; + resetPasswordEnable = true; // This shows the reset fields _isLoading = false; + hasMinLength = false; + hasUpperLower = false; + hasNumber = false; + hasSpecialChar = false; + + // ✅ ADD THESE LINES TO CLEAR CACHED DATA + resetPasswordController.clear(); + confirmPasswordController.clear(); + _formKey.currentState?.reset(); }); // ToastHelper.showSuccessToast(context, message); } else { @@ -845,6 +862,17 @@ class _loginState extends State { resetPasswordEnable = false; clickedForgotPassword = false; otpFieldShow = false; + + // ✅ CLEAR THE CONTROLLERS HERE + resetPasswordController.clear(); + confirmPasswordController.clear(); + _otpController.clear(); + // emailController.clear(); // Uncomment if you want the email cleared too + + // Reset the form state to clear validation error messages + _formKey.currentState?.reset(); + emailController.text = ''; + emailController.clear(); }); // ToastHelper.showSuccessToast(context, message); } else { @@ -1757,39 +1785,6 @@ class _loginState extends State { ), ), ), - // RichText( - // textAlign: - // TextAlign.right, - // text: - // TextSpan( - // text: - // 'Didn’t Receive Code? ', // normal text - // style: - // TextStyle( - // fontSize: Responsive.isMobile(context) - // ? 12 - // : 14, - // fontWeight: - // FontWeight.normal, - // color: - // Colors.black, - // ), - // children: [ - // TextSpan( - // text: 'Resend', // bold clickable part - // style: TextStyle( - // fontWeight: FontWeight.bold, - // color: Colors.white, - // decoration: TextDecoration.underline, // optional - // ), - // // recognizer: TapGestureRecognizer() - // // ..onTap = () { - // // - // // }, - // ), - // ], - // ), - // ), ), ], ) @@ -1867,6 +1862,7 @@ class _loginState extends State { borderRadius: BorderRadius.circular(10), ), child: TextFormField( + key: const ValueKey('new_password_field'), controller: resetPasswordController, obscureText: _resetObscurePassword, onChanged: validatePassword, @@ -1926,6 +1922,7 @@ class _loginState extends State { borderRadius: BorderRadius.circular(10), ), child: TextFormField( + key: const ValueKey('confirm_password_field'), controller: confirmPasswordController, obscureText: _obscureConfirmPassword, textAlignVertical: TextAlignVertical.center,