showInAppRate static method

void showInAppRate({
  1. List<int> showWithCounts = const [],
  2. dynamic rateCounterName = "inapprate",
})

Implementation

static void showInAppRate(
    {List<int> showWithCounts = const [],
    rateCounterName = "inapprate"}) async {
  if (showWithCounts.isEmpty) {
    if (await inAppReview.isAvailable()) {
      inAppReview.requestReview();
      logEvent("inapp_review_showed");
    }
    return;
  }

  ActionCounter.increase(rateCounterName);
  var count = ActionCounter.get(rateCounterName);

  if (showWithCounts.contains(count)) {
    if (await inAppReview.isAvailable()) {
      inAppReview.requestReview();
    }
  }
}