forgetPassword method
Start the forget password flow using email OTP
email
The email address of the user
Implementation
Future<SuccessResponse> forgetPassword({required String email}) async {
try {
final response = await dio.post("/email-otp/forget-password", data: {"email": email});
return SuccessResponse.fromJson(response.data);
} catch (e) {
final message = getErrorMessage(e);
if (message == null) rethrow;
throw message;
}
}