create static method

Future<InterstitialAdLoader> create({
  1. void onAdLoaded(
    1. InterstitialAd interstitialAd
    )?,
  2. void onAdFailedToLoad(
    1. AdRequestError error
    )?,
})

Implementation

static Future<InterstitialAdLoader> create({
  void Function(InterstitialAd interstitialAd)? onAdLoaded,
  void Function(AdRequestError error)? onAdFailedToLoad,
}) async {
  int? id = await _createChannel.invokeMethod('interstitialAdLoader');
  if (id == null) {
    throw ArgumentError(
        'something went wrong while creating interstitial ad loader');
  }

  return InterstitialAdLoader._(
    id: id,
    onAdLoaded: onAdLoaded,
    onAdFailedToLoad: onAdFailedToLoad,
  );
}