resendVerificationOtp method
To resend verification otp user needs to use below API
Implementation
Future<http.Response> resendVerificationOtp({
required String userName,
}) async {
Uri url = Uri.parse("$_baseUrl/user/resend-verification-otp");
final body = jsonEncode({
"username": userName,
"business": SharedPreference.getBusinessConfig()!.businessId,
});
printMessage(body);
http.Response response =
await http.Client().post(url, body: body, headers: kPostRequestHeader);
if (response.statusCode == 200) {
printMessage("RESEND VERIFICATION OTP RESPONSE = ${response.body}");
return response;
} else {
printMessage("RESEND VERIFICATION OTP RESPONSE = ${response.statusCode}");
printMessage("RESEND VERIFICATION OTP RESPONSE = ${response.body}");
return response;
}
}