loadInterstitialAd static method

Future<bool?> loadInterstitialAd({
  1. String placementId = "YOUR_PLACEMENT_ID",
  2. dynamic listener(
    1. InterstitialAdResult,
    2. dynamic
    )?,
})

Loads an Interstitial Ad in background. Replace the default placementId with the one which you obtain by signing-up for Facebook Audience Network.

listener passes InterstitialAdResult and information associated with the result to the implemented callback.

Information will generally be of type Map with details such as:

{
  'placement_id': "YOUR_PLACEMENT_ID",
  'invalidated': false,
  'error_code': 2,
  'error_message': "No internet connection",
}

Implementation

static Future<bool?> loadInterstitialAd({
  String placementId = "YOUR_PLACEMENT_ID",
  Function(InterstitialAdResult, dynamic)? listener,
}) async {
  return await FacebookInterstitialAd.loadInterstitialAd(
    placementId: placementId,
    listener: listener,
  );
}