showInterstitial static method

Future<void> showInterstitial({
  1. required String placementId,
})

Shows an interstitial ad for the specified placement ID. This method should be called only if isInterstitialReady returns true. The interstitial ad is a full-screen ad that covers the entire screen.

Implementation

static Future<void> showInterstitial({required String placementId}) async {
  try {
    await _channel.invokeMethod('showInterstitial', {
      'placementId': placementId,
    });
  } catch (e) {
    debugPrint('Error showing interstitial: $e');
  }
}