loadPriceRes method
Implementation
Future<PayPriceEntity> loadPriceRes(String priceUrl) async {
PayPriceEntity resultPrices;
try {
var response = await get(priceUrl).build().execute();
resultPrices = PayPriceEntity.fromJson({"price_list": response.data});
localStorage.setItem(priceListKey, resultPrices);
} catch (_) {
var historyPrices = await localStorage.getItem(priceListKey);
resultPrices = PayPriceEntity.fromJson(historyPrices);
}
return resultPrices;
}