getCurrencyListings method
Implementation
Future getCurrencyListings() async {
try {
isLoading.value = true;
var listingsMap = await c4bservices.getCurrencyListings();
currencyListings = listingsMap['data'];
isLoading.value = false;
debugPrint('Currencies successfully fetched from the API!');
} catch (e, s) {
if (e is SocketException) {
debugPrint("Get currency details controller error $e $s");
Get.snackbar('Internet Error', "Couldn't get currency listings");
} else {
debugPrint("Get currency details controller error $e $s");
Get.snackbar('Error', "Couldn't get currency listings");
}
rethrow;
}
}