on<T extends VyuhEvent> method

  1. @override
DisposeFunction on<T extends VyuhEvent>(
  1. VyuhEventListener<T> listener
)
override

Implementation

@override
DisposeFunction on<T extends VyuhEvent>(VyuhEventListener<T> listener) {
  final subscription = _eventBus!.on<T>().listen((event) {
    listener(event);
  });

  return () {
    subscription.cancel();
  };
}