onEvent<T> method

void onEvent <T>(
  1. dynamic handler(
    1. T event
    )
)

Implementation

void onEvent<T>(Function(T event) handler) {
  if (T == dynamic) {
    throw ArgumentError('T must not be dynamic');
  }

  channel.input.onEvent<T>(this, handler);
}