showInterstitial method

Future<void> showInterstitial(
  1. AdCallback? callback
)

Shows the Interstitial ad if available. @param activity The activity from which the Interstitial ad should be shown. @param callback The callback for Interstitial ad events.

Implementation

Future<void> showInterstitial(AdCallback? callback) {
  if (_interstitial == null) {
    callback?.onShowFailed("Not ready");
    return Future.value();
  }
  _interstitialCallback = callback;
  return _interstitial!.show();
}