showInterstitialAd static method
Show an interstitial Ad
adUnitId
- The ID of the interstitial ad unit.onStart
- called on when an ad has started playback.onClick
- called on when an ad has been clicked by the user.onClosed
- called on when an ad has closed after playback has completed.onFailed
- called on when an ad has a failure during playback.
Implementation
static Future<void> showInterstitialAd({
required String adUnitId,
Function(String adUnitId)? onStart,
Function(String adUnitId)? onClick,
Function(String adUnitId)? onClosed,
Function(String adUnitId, ShowError error, String errorMessage)? onFailed,
}) async {
await _showAd(
methodName: showInterstitialAdMethod,
adUnitId: adUnitId,
onStart: onStart,
onClick: onClick,
onClosed: onClosed,
onFailed: onFailed,
);
}