addEventListener method

void addEventListener(
  1. String event,
  2. void callback(
    1. Event
    ), {
  3. Map<String, String>? options,
})

Implementation

void addEventListener(String event, void Function(Event) callback,
    {Map<String, String>? options}) {
  eventListeners.add({
    'event': event,
    'callback': callback,
    'options': options,
  });
}