isRewardedAdLoaded method

bool isRewardedAdLoaded({
  1. AdNetwork adNetwork = AdNetwork.any,
})

Returns bool indicating whether ad has been loaded

if adNetwork is provided, only that network's ad would be checked

Implementation

bool isRewardedAdLoaded({AdNetwork adNetwork = AdNetwork.any}) {
  final ad = _rewardedAds.firstWhereOrNull((e) =>
      (adNetwork == AdNetwork.any || adNetwork == e.adNetwork) &&
      e.isAdLoaded);
  return ad?.isAdLoaded ?? false;
}