AMPSNativeAd constructor

AMPSNativeAd({
  1. required AdOptions config,
  2. NativeType nativeType = NativeType.native,
  3. AMPSNativeAdListener? mCallBack,
  4. AMPSNativeRenderListener? mRenderCallBack,
  5. 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)),
  );
}