sendVerificationOTP method
Send verification OTP to email address of the user
email
The email address of the user
type
The type of the OTP. Can be either "sign-in", "email-verification" or "forget-password"
Implementation
Future<SuccessResponse> sendVerificationOTP({required String email, required String type}) async {
try {
final response = await dio.post(
"/email-otp/send-verification-otp",
data: {"email": email, "type": type},
options: await getOptions(isTokenRequired: false),
);
return SuccessResponse.fromJson(response.data);
} catch (e) {
final message = getErrorMessage(e);
if (message == null) rethrow;
throw message;
}
}