Added error message text to new password screen
This commit is contained in:
@@ -181,6 +181,17 @@ class NewPasswordScreenState extends ConsumerState<NewPasswordScreen> {
|
||||
))
|
||||
]
|
||||
),
|
||||
if (viewState.errorMessage.isNotEmpty) ...[
|
||||
SizedBox(height: 10),
|
||||
Text(
|
||||
viewState.errorMessage,
|
||||
textAlign: TextAlign.center,
|
||||
style: const TextStyle(
|
||||
color: Color.fromRGBO(239, 17, 17, 1),
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
SizedBox(height: 56),
|
||||
PrimaryButton(
|
||||
onPressed: () async {
|
||||
|
||||
@@ -87,6 +87,7 @@ class RecoverPasswordViewModel extends Notifier<RecoverPasswordViewState> {
|
||||
|
||||
state = state.copyWith(
|
||||
password: raw,
|
||||
errorMessage: '',
|
||||
equalPasswords: equalPasswords,
|
||||
securityChecks: security,
|
||||
);
|
||||
@@ -97,6 +98,7 @@ class RecoverPasswordViewModel extends Notifier<RecoverPasswordViewState> {
|
||||
final bool equalPasswords = raw == passwordController.text;
|
||||
state = state.copyWith(
|
||||
repeatedPassword: raw,
|
||||
errorMessage: '',
|
||||
equalPasswords: equalPasswords,
|
||||
);
|
||||
}
|
||||
@@ -133,7 +135,7 @@ class RecoverPasswordViewModel extends Notifier<RecoverPasswordViewState> {
|
||||
|
||||
if (email.isNotEmpty) {
|
||||
await requestEmail();
|
||||
}else if (trimmedNumber.isNotEmpty) {
|
||||
} else if (trimmedNumber.isNotEmpty) {
|
||||
await requestSms();
|
||||
} else {
|
||||
state = state.copyWith(
|
||||
|
||||
Reference in New Issue
Block a user