runPostData method
Future
runPostData(
- dynamic config
)
Implementation
Future runPostData(config) async {
try {
isLoading.value = true;
postDataResponse = await c4bservices.postData();
if (postDataStatusCode == 201) {
debugPrint('Payment Details successfully fetched from the API!');
paymentID = postDataResponse['data']['payment']['id'];
isLoading.value = false;
}
} catch (e, s) {
if (e is SocketException) {
debugPrint("runPostData() details controller error $e $s");
Get.snackbar('Internet Error', "Couldn't get payment details");
} else {
debugPrint("runPostData() details controller error $e $s");
Get.snackbar('Error', "Couldn't get payment details");
}
rethrow;
}
}