onEvent method

StreamSubscription<EventAction<T>> onEvent(
  1. T event,
  2. DispatchActionListener<T> onListen
)

监听指定事件

Implementation

StreamSubscription<EventAction<T>> onEvent(
  T event,
  DispatchActionListener<T> onListen,
) {
  return onEventBy((item) => event == item, onListen);
}