create static method

Future<AppOpenAdLoader> create({
  1. void onAdLoaded(
    1. AppOpenAd appOpenAd
    )?,
  2. void onAdFailedToLoad(
    1. AdRequestError error
    )?,
})

Implementation

static Future<AppOpenAdLoader> create({
  void Function(AppOpenAd appOpenAd)? onAdLoaded,
  void Function(AdRequestError error)? onAdFailedToLoad,
}) async {
  int? id = await _createChannel.invokeMethod('appOpenAdLoader');
  if (id == null) {
    throw ArgumentError(
        'something went wrong while creating app open ad loader');
  }

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