AdropNativeAd constructor
Implementation
AdropNativeAd({
required String unitId,
this.useCustomClick = false,
this.preferredAdChoicesPosition = AdropAdChoicesPosition.topRight,
this.listener,
}) : _unitId = unitId,
_loaded = false {
_requestId = nanoid();
if (listener != null) {
_adropEventObserverChannel = MethodChannel(
AdropChannel.adropEventListenerChannelOf(AdType.native, _requestId) ??
'',
);
_adropEventObserverChannel?.setMethodCallHandler(_handleEvent);
} else {
_adropEventObserverChannel = null;
}
}