onStateChange<TState> static method

Disposable onStateChange<TState>(
  1. ChangeTokenProducer changeTokenProducer,
  2. ChangeTokenTypedConsumer<TState> changeTokenConsumer,
  3. TState state
)

Registers the changeTokenConsumer action to be called whenever the token produced changes.

Implementation

static Disposable onStateChange<TState>(
  ChangeTokenProducer changeTokenProducer,
  ChangeTokenTypedConsumer<TState> changeTokenConsumer,
  TState state,
) =>
    _ChangeTokenRegistration<TState>(
      changeTokenProducer,
      changeTokenConsumer,
      state,
    );