resendOtp method
Implementation
Future<Map<String, dynamic>> resendOtp(
String txnId,String accessToken) async {
final url = Uri.parse('https://dev-smartverify.aionos.co/api/v1/id-auth/resendOtp?txnId=$txnId');
final headers = {
'Authorization': 'Bearer '+accessToken,
'Content-Type': 'application/json',
};
final response = await http.post(url, headers: headers);
if (response.statusCode == 200) {
return jsonDecode(response.body);
} else {
throw Exception('Failed to resend OTP: ${response.body}');
}
}