AMPSNativeAd constructor
AMPSNativeAd({
- required AdOptions config,
- NativeType nativeType = NativeType.native,
- AMPSNativeAdListener? mCallBack,
- AMPSNativeRenderListener? mRenderCallBack,
- String? instanceId,
Implementation
AMPSNativeAd({
required this.config,
this.nativeType = NativeType.native,
this.mCallBack,
this.mRenderCallBack,
String? instanceId,
}) : instanceId = instanceId ?? _generateInstanceId() {
NativeCallbackRouter.instance.register(this.instanceId, _handleCall);
AdscopeSdk.invokeMethod(
AMPSAdSdkMethodNames.nativeCreate,
_wrapArgs(config.toMap(nativeType: nativeType)),
);
}