CancelTestBooking method
Future
CancelTestBooking(
{ - dynamic context,
})
Implementation
Future CancelTestBooking({context}) async {
var decodedResponse;
try {
final response = await http.post(
Uri.parse(
'${SDK_BASE_URL}api/diagnostics/diagnostic_booking_cancel_request'),
headers: {'Authorization': SignUpController.currentUserToken},
body: {},
);
decodedResponse = json.decode(response.body);
if (decodedResponse['status'] == 200) {
showDialog(
context: context,
barrierDismissible: false,
builder: (BuildContext context) {
return PinCodePopUp(
messag: "${decodedResponse['message']}",
image: '${LottiePath}Upload_Successful.json',
);
},
);
}
} catch (e) {
errorListner(
apiname: 'api/diagnostics/diagnostic_booking_cancel_request',
responsed: "${decodedResponse}",
request: '',
app_error: '${e}');
}
}