register<E extends JEffect> method
Registers a handler for a specific type of JEffect.
The handler function receives both the effect instance and the controller. Use this to define how each specific effect should be handled in the UI.
Implementation
void register<E extends JEffect>(
Future<void> Function(E effect, JController<T> controller) handler,
) {
_handlers[E] = (effect, controller) => handler(effect as E, controller);
}