Untitled
unknown
plain_text
3 years ago
926 B
8
Indexable
Future resendOTP() async {
final AuthenticationManager authManager = Get.find();
authManager.commonTools.showLoading();
try {
await httpClient
.post(
'${baseUrl}Otp/ReSendOtp',
data: {
'token': authManager.getToken(),
},
options: Options(
headers: {
'accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': authManager.getToken(),
'Accept-Language': Get.locale!.languageCode,
'Language': Get.locale!.languageCode,
},
),
)
.then((response) async {
if (response.statusCode == 200) {
Get.back();
authManager.commonTools.showSuccessSnackBar('otpSentSuccessfully');
}
});
} on DioError catch (e) {
Get.back();
commonTools.showApiResponseFailed(e, 'resendOTP');
}
}
Editor is loading...