sendEvent<T> static method

void sendEvent<T>(
  1. Event<T> event
)

发送事件 event事件

Implementation

static void sendEvent<T>(Event<T> event) {
  log("EventBus sendEvent:$event");
  if (!_eventBus.containsKey(event.key)) {
    _eventBus.putIfAbsent(event.key, () => LiveData<Event<T>>(Event.empty(key: event.key)));
  }
  _eventBus[event.key]!.setValue(event);
}