SDK Documentation
HomeBlogSign up
English
English
  • 🏠Homepage
  • 🧪Test Ad Units
  • Privacy
    • ✅Google Data Safety
  • Android SDK
    • ⌨️SDK integration
      • App Open
      • Banner
      • Interstitial
      • Rewarded
      • Native (Google)
      • Targeting
      • Revenue reporting
    • 🙎User consent
    • 🔓Privacy
    • 🛠️ProGuard
  • iOS SDK
    • ⌨️SDK integration
      • App Open
      • Banner
      • Interstitial
      • Rewarded
      • Native (Google)
      • Revenue reporting
    • 🙍User consent
    • 🔓Privacy
  • Unity SDK
    • ⌨️SDK integration
      • App Open
      • Banner
      • Interstitial
      • Rewarded
      • Targeting
      • Revenue reporting
    • 🙎User consent
    • 🔓Privacy
  • Flutter SDK
    • ⌨️SDK integration
      • App Open
      • Banner
      • Interstitial
      • Rewarded
      • Native (Google)
      • Targeting
      • Revenue reporting
    • 🙎User consent
    • 🔓Privacy
  • React Native
    • ⌨️SDK integration
      • App Open
      • Banner
      • Interstitial
      • Rewarded
      • Targeting
      • Revenue reporting
    • 🙎User consent
    • 🔓Privacy
  • Web SDK
    • ⌨️SDK integration
Con tecnología de GitBook
En esta página
  • Integration
  • Listener events
  1. Flutter SDK
  2. SDK integration

Interstitial

Integration

Below we show a simple example to understand how interstitial ads work:

import 'package:wortise/interstitial_ad.dart';

InterstitialAd _interstitialAd;

// Create an interstitial
_interstitialAd = InterstitialAd('Wortise Ad Unit ID', (event, args) {
  // This listener will be invoked when an event happens
});

// Request an ad
await _interstitialAd.loadAd();

/* ... */

// Show the ad if available
if (await _interstitialAd.isAvailable) {
  await _interstitialAd.showAd();
}

The InterstitialAd class constructor admits a third parameter, called reloadOnDismissed, that when it is set to true (the default value is false) allows the interstitial to automatically load a new ad when the current one is dismissed.

Listener events

The assigned listener to an InterstitialAd can receive the following events:

// The ad has been clicked
InterstitialAdEvent.CLICKED
// The ad has been dismissed
InterstitialAdEvent.DISMISSED
// The ad could not be loaded
InterstitialAdEvent.FAILED_TO_LOAD
// The ad could not be shown
InterstitialAdEvent.FAILED_TO_SHOW
// The ad has generated an impression
InterstitialAdEvent.IMPRESSION
// The ad has been loaded
InterstitialAdEvent.LOADED
// The ad has generated revenue
InterstitialAdEvent.REVENUE_PAID
// The ad has been shown
InterstitialAdEvent.SHOWN
AnteriorBannerSiguienteRewarded

Última actualización hace 3 días

⌨️