getSubscriptionPrice static method

Price getSubscriptionPrice()

Implementation

static Price getSubscriptionPrice() {
  double amount = appProperties['subscriptionPrice'];
  String currency = appProperties['subscriptionCurrency'] ?? 'MXN';
  AppCurrency appCurrency = AppCurrency.values.firstWhere(
    (e) => e.toString().split('.').last.toUpperCase() == currency.toUpperCase(),
    orElse: () => AppCurrency.mxn,
  );

  return Price(amount: amount, currency: appCurrency);
}