showRateUsDialog method

Future<void> showRateUsDialog({
  1. String fallbackUrl = '',
})

Implementation

Future<void> showRateUsDialog({String fallbackUrl = ''}) async {
  final InAppReview inAppReview = InAppReview.instance;
  if (await inAppReview.isAvailable()) {
    await inAppReview.requestReview();
  } else if (fallbackUrl.isNotEmpty) {
    // In-app review unavailable (development build, quota exhausted, etc.)
    // Open the store listing directly so the user can still leave a review.
    await launchUrl(Uri.parse(fallbackUrl), mode: LaunchMode.externalApplication);
  }
}