listen<T> method Null safety

void listen<T>(
  1. dynamic handler(
    1. T
    )
)

Implementation

void listen<T>(Function(T) handler) {
	if (_handlers[T] == null) _handlers[T] = <Function>[];
	_handlers[T]!.add(handler);
}