register method

  1. @override
void register(
  1. Listenable event()
)
override

Implementation

@override
void register(Listenable Function() event) {
  final instance = event();

  switch (instance) {
    case ListenableEvent():
      _kernel.eventListener.listen(
          event: instance.event,
          handle: (instance as dynamic).handle as Function,
          customId: instance.customId);
  }
}