on<A extends FloatyAction> method
Registers a handler for the action class identified by key.
The handler runs whenever the other side dispatches an action whose
type matches key.type.
Implementation
void on<A extends FloatyAction>(
ActionKey<A> key,
FutureOr<void> Function(A action) handler,
) {
_handlers[key.type] = _HandlerEntry<A>(
fromJson: key.fromJson,
handler: handler,
);
}