claimSubmissionKYCDocListDelete method
dynamic
claimSubmissionKYCDocListDelete({
- dynamic rowID,
Implementation
claimSubmissionKYCDocListDelete({rowID}) async {
var checkStatusCode;
try {
http.Response response = await http.post(
Uri.parse('${choice_Base_Url}claim_submission_kyc_docs_list_delete'),
body: {
"rowID": rowID.toString()
},
headers: {
"Authorization": choiceToken,
});
TokenRefresh(refreshtoken: response.headers['authorization'].toString());
checkStatusCode = response.statusCode;
var decodedResponse = await json.decode(response.body);
if (decodedResponse['status'] == true) {
Fluttertoast.showToast(
msg: decodedResponse['message'] ?? errorMessage,
gravity: ToastGravity.CENTER,
timeInSecForIosWeb: 2);
}
} catch (err) {
AutoLogoutThreeTry();
if (checkStatusCode == 401) {
await claimSubmissionKYCDocListDelete(rowID: rowID);
(commonContext as Element).reassemble();
} else {}
}
}