update forgot password
This commit is contained in:
@@ -128,6 +128,11 @@ class _LoginPageState extends ConsumerState<LoginPage> {
|
||||
);
|
||||
}
|
||||
|
||||
/// Navigate to forgot password page
|
||||
void _navigateToForgotPassword() {
|
||||
context.pushNamed(RouteNames.forgotPassword);
|
||||
}
|
||||
|
||||
/// Show support dialog
|
||||
void _showSupport() {
|
||||
showDialog<void>(
|
||||
@@ -196,12 +201,6 @@ class _LoginPageState extends ConsumerState<LoginPage> {
|
||||
// Support Link
|
||||
_buildSupportLink(),
|
||||
|
||||
TextButton(onPressed: () {
|
||||
context.pushNamed(RouteNames.otpVerification);
|
||||
}, child: Text('otp')),
|
||||
TextButton(onPressed: () {
|
||||
context.pushReplacementNamed(RouteNames.home);
|
||||
}, child: Text('home'))
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -408,36 +407,55 @@ class _LoginPageState extends ConsumerState<LoginPage> {
|
||||
|
||||
const SizedBox(height: AppSpacing.sm),
|
||||
|
||||
// Remember Me Checkbox
|
||||
// Remember Me Checkbox & Forgot Password
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Checkbox(
|
||||
value: _rememberMe,
|
||||
onChanged: isLoading
|
||||
? null
|
||||
: (value) {
|
||||
setState(() {
|
||||
_rememberMe = value ?? false;
|
||||
});
|
||||
},
|
||||
activeColor: AppColors.primaryBlue,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(4.0),
|
||||
),
|
||||
// Remember Me Checkbox
|
||||
Row(
|
||||
children: [
|
||||
Checkbox(
|
||||
value: _rememberMe,
|
||||
onChanged: isLoading
|
||||
? null
|
||||
: (value) {
|
||||
setState(() {
|
||||
_rememberMe = value ?? false;
|
||||
});
|
||||
},
|
||||
activeColor: AppColors.primaryBlue,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(4.0),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: isLoading
|
||||
? null
|
||||
: () {
|
||||
setState(() {
|
||||
_rememberMe = !_rememberMe;
|
||||
});
|
||||
},
|
||||
child: const Text(
|
||||
'Ghi nhớ đăng nhập',
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: AppColors.grey500,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
// Forgot Password Link
|
||||
GestureDetector(
|
||||
onTap: isLoading
|
||||
? null
|
||||
: () {
|
||||
setState(() {
|
||||
_rememberMe = !_rememberMe;
|
||||
});
|
||||
},
|
||||
child: const Text(
|
||||
'Ghi nhớ đăng nhập',
|
||||
onTap: isLoading ? null : _navigateToForgotPassword,
|
||||
child: Text(
|
||||
'Quên mật khẩu?',
|
||||
style: TextStyle(
|
||||
fontSize: 14.0,
|
||||
color: AppColors.grey500,
|
||||
color: isLoading ? AppColors.grey500 : AppColors.primaryBlue,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user