transformTransitions method

Stream<TransformController<E, S>> transformTransitions(
  1. Stream<TransformController<E, S>> transitions
)
inherited

Transforms the Stream<Transition> into a new Stream<Transition>. By default transformTransitions returns the incoming Stream<Transition>. You can override transformTransitions 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 state changes:

@override
Stream<Transition<Event, State>> transformTransitions(
  Stream<Transition<Event, State>> transitions,
) {
  return transitions.debounceTime(Duration(seconds: 1));
}

Implementation

Stream<TransformController<Event, State>> transformTransitions(
  Stream<TransformController<Event, State>> transitions,
) {
  return transitions;
}