show method

Future<bool> show()
override

Show the rewarded ad. This returns a Future that will complete when the ad gets closed

The ad must be loaded. To check if the ad is loaded, call rewardedAd.isLoaded. If it's not loaded, throws an AssertionError

This can be shown only once. If you try to show it more than once, it'll fail. If you need to show it more than once, read this

Usage

print('showing the ad');
await (await rewardedAd.load()).show();
print('ad showed');

For more info, read the documentation

Implementation

Future<bool> show() async {
  ensureAdNotDisposed();
  assertMobileAdsIsInitialized();
  ensureAdAvailable();
  return (await channel.invokeMethod<bool>('show'))!;
}