transformStates method

Stream<State> transformStates(
  1. Stream<State> states
)

Transforms the Stream<State> into a new Stream<State>. By default transformStates returns the incoming Stream<State>. You can override transformStates for advanced usage in order to manipulate the frequency and specificity at which transitions (state changes) occur.

For example, if you want to debounce outgoing states:

@override
Stream<State> transformStates(Stream<State> states) {
  return states.debounceTime(Duration(seconds: 1));
}

Implementation

Stream<State> transformStates(Stream<State> states) => states;