AMPSInterstitialAd constructor
AMPSInterstitialAd({
- required AdOptions config,
- AdCallBack? mCallBack,
- 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'));
}