AMPSInterstitialAd constructor

AMPSInterstitialAd({
  1. required AdOptions config,
  2. AdCallBack? mCallBack,
  3. String? instanceId,
})

Implementation

AMPSInterstitialAd({required this.config, this.mCallBack, String? instanceId})
    : instanceId = instanceId ?? _generateInstanceId() {
  InterstitialCallbackRouter.instance
      .register(this.instanceId, mCallBack, _closeWidgetCall);
  _creation = AdscopeSdk.invokeMethod(
    AMPSAdSdkMethodNames.interstitialCreate,
    _wrapArgs(config.toMap()),
  ).then<PlatformException?>((_) => null,
      onError: (Object error) => error is PlatformException
          ? error
          : PlatformException(code: 'CREATE_FAILED', message: '$error'));
}