on<A extends FloatyAction> method

void on<A extends FloatyAction>(
  1. ActionKey<A> key,
  2. FutureOr<void> handler(
    1. A action
    )
)

Registers handler for actions whose type matches key.type.

Implementation

void on<A extends FloatyAction>(
  ActionKey<A> key,
  FutureOr<void> Function(A action) handler,
) => _handlers.add<A>(key, handler);