showInterstitialAd static method

Future<bool?> showInterstitialAd({
  1. int? delay = 0,
})

Shows an Interstitial Ad after it has been loaded. (This needs to be called only after calling loadInterstitialAd function). delay is in milliseconds.

Example:

FacebookInterstitialAd.loadInterstitialAd(
  listener: (result, value) {
    if (result == InterstitialAdResult.LOADED)
      FacebookInterstitialAd.showInterstitialAd(delay: 5000);
  },
);

Implementation

static Future<bool?> showInterstitialAd({int? delay = 0}) async {
  try {
    final args = <String, dynamic>{
      "delay": delay,
    };

    final result = await _channel.invokeMethod(
      SHOW_INTERSTITIAL_METHOD,
      args,
    );

    return result;
  } on PlatformException {
    return false;
  }
}