Added dialogue for success message

This commit is contained in:
hannathkadher
2024-09-02 13:25:58 +04:00
parent df13840a65
commit a72fc0b466
2 changed files with 74 additions and 27 deletions
+3 -1
View File
@@ -232,13 +232,15 @@ class AuthCubit extends Cubit<AuthState> {
}
}
reSendOtp() async {
Future<bool> reSendOtp() async {
try {
emit(AuthLoading());
await AuthenticationAPI.sendOtp(body: {'email': email, 'type': 'VERIFICATION'});
emit(ResendOtpSuccess());
return true;
} catch (_) {
emit(AuthLoginError(message: 'Something went wrong'));
return false;
}
}