FIX_TrackerAssigned

This commit is contained in:
sanjeev.p 2026-02-16 09:28:04 +05:30
parent 511a671c06
commit df4d01ee6e
3 changed files with 35 additions and 37 deletions

View File

@ -1269,8 +1269,8 @@ class _MyEmailVerifyState extends State<MyEmailVerify> {
// ), // ),
SizedBox( SizedBox(
height: Responsive.isDesktop(context) height: Responsive.isDesktop(context)
? _size.height * 0.3 ? _size.height * 0.4
: _size.height * 0.2, : _size.height * 0.3,
), ),
// SizedBox( // SizedBox(
// height: _size.height * 0.1, // height: _size.height * 0.1,

View File

@ -2636,7 +2636,8 @@ class _empDetailsState extends State<empDetails> {
children: familyFloaterContainers, children: familyFloaterContainers,
), ),
// Add Family Member Button HERE // Add Family Member Button HERE
if (gmcOpenForEnrollment != 0 && gmcECardDownload == null)...[ // if (gmcOpenForEnrollment != 0 && gmcECardDownload == null)...[
if(gmcOpenForEnrollment != 0 && gmcECardDownload == null && getFalseObjects.isNotEmpty)...[
GestureDetector( GestureDetector(
onTap: () { onTap: () {
if (getFalseObjects.length == 0) { if (getFalseObjects.length == 0) {

View File

@ -664,6 +664,14 @@ class _loginState extends State<login> {
clickedForgotPassword = true; clickedForgotPassword = true;
passwordController.text = ''; passwordController.text = '';
passwordController.clear(); 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<login> {
otpValueStatus = false; otpValueStatus = false;
otpFieldShow = false; otpFieldShow = false;
clickedForgotPassword = false; clickedForgotPassword = false;
resetPasswordEnable = true; resetPasswordEnable = true; // This shows the reset fields
_isLoading = false; _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); // ToastHelper.showSuccessToast(context, message);
} else { } else {
@ -845,6 +862,17 @@ class _loginState extends State<login> {
resetPasswordEnable = false; resetPasswordEnable = false;
clickedForgotPassword = false; clickedForgotPassword = false;
otpFieldShow = 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); // ToastHelper.showSuccessToast(context, message);
} else { } else {
@ -1757,39 +1785,6 @@ class _loginState extends State<login> {
), ),
), ),
), ),
// RichText(
// textAlign:
// TextAlign.right,
// text:
// TextSpan(
// text:
// 'Didnt 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<login> {
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),
child: TextFormField( child: TextFormField(
key: const ValueKey('new_password_field'),
controller: resetPasswordController, controller: resetPasswordController,
obscureText: _resetObscurePassword, obscureText: _resetObscurePassword,
onChanged: validatePassword, onChanged: validatePassword,
@ -1926,6 +1922,7 @@ class _loginState extends State<login> {
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),
child: TextFormField( child: TextFormField(
key: const ValueKey('confirm_password_field'),
controller: confirmPasswordController, controller: confirmPasswordController,
obscureText: _obscureConfirmPassword, obscureText: _obscureConfirmPassword,
textAlignVertical: TextAlignVertical.center, textAlignVertical: TextAlignVertical.center,