TestPlaceorder method
Future
TestPlaceorder(
{ - dynamic userpackageId,
- dynamic checkbox,
})
Implementation
Future TestPlaceorder({userpackageId, checkbox}) async {
var decodedResponse;
var body;
try {
Map data = {
"insert_id": "${Testorderid}",
"user_package_id": "${userpackageId}",
"check_use_wallet": "${checkbox}",
};
body = jsonEncode(data);
final response = await http.post(
Uri.parse('${SDK_BASE_URL}diagnostics_api/place_order'),
headers: {'Authorization': SignUpController.currentUserToken},
body: body,
);
decodedResponse = json.decode(response.body);
TestplaceOrderDetails = await decodedResponse;
Get.back();
Get.to(PaymentPopup(
messag: '${decodedResponse['data']['message']}',
image: '${LottiePath}Upload_Successful.json',
fromplace: 'Test',
));
await LocalDatabaseForDiagnostics.instance.DeletedbPaymentList();
} catch (e) {
errorListner(
apiname: 'diagnostics_api/place_order',
responsed: "${decodedResponse}",
request: '${body}',
app_error: '${e}');
}
}