onNativeExpress method

void onNativeExpress(
  1. IPDEvent event
)

信息流事件回调

Implementation

void onNativeExpress(IPDEvent event) {
  int id = event.viewId;
  if (_nativeExpressListenerMap.containsKey(id)) {
    Function(IPDEvent)? listener = _nativeExpressListenerMap[id];
    listener?.call(event);
    if (event.action == IPDEventAction.onAdLoadFailed ||
        event.action == IPDEventAction.onAdLoaded ||
        event.action == IPDEventAction.onAdShowError ||
        event.action == IPDEventAction.onAdClose) {
      _nativeExpressListenerMap.remove(id);
    }
  }
}