canShowRewarded static method

bool canShowRewarded()

Check if rewarded ad can be shown

Implementation

static bool canShowRewarded() {
  if (_lastRewardedShown == null) {
    return true;
  }

  final now = DateTime.now();
  final difference = now.difference(_lastRewardedShown!).inSeconds;
  return difference >= config.minRewardedInterval;
}