addHandler<Tevent> method

  1. @protected
void addHandler<Tevent>(
  1. void handler(
    1. Tevent event
    )
)

Add a handler to handle a specific event.

Implementation

@protected
void addHandler<Tevent>(void Function(Tevent event) handler) {
  _handlers[Tevent] = (Object e) => handler(e as Tevent);
}