addEventListener method

void addEventListener(
  1. String eventType,
  2. EventHandler eventHandler
)
inherited

Implementation

void addEventListener(String eventType, EventHandler eventHandler) {
  List<EventHandler>? existHandler = eventHandlers[eventType];
  if (existHandler == null) {
    eventHandlers[eventType] = existHandler = [];
  }
  existHandler.add(eventHandler);
}