getSubscriptionPrice method

  1. @override
double getSubscriptionPrice(
  1. SubscriptionLevel level
)
override

Implementation

@override
double getSubscriptionPrice(SubscriptionLevel level) {
  AppConfig.logger.d("Getting Subscription Price for Level: ${level.name}");

  _subscriptionPlans.forEach((key, plan) {
    if(plan.level == level) {
      _selectedPlan = plan;
      _selectedPlanName.value = selectedPlan.name;
      _selectedPlanImgUrl.value = selectedPlan.imgUrl;
      _selectedPrice.value = selectedPlan.price!;
    }
  });

  return _selectedPrice.value.amount;
}