transformTransitions method

  1. @Deprecated('Override `Stream<State> get stream` instead. Will be removed in v8.0.0')
Stream<Transition<MeEvent, MeState>> transformTransitions(
  1. Stream<Transition<MeEvent, MeState>> transitions
)
inherited

@Deprecated - Override Stream<State> get stream instead. Will be removed in v8.0.0

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

@Deprecated(
  'Override `Stream<State> get stream` instead. Will be removed in v8.0.0',
)
Stream<Transition<Event, State>> transformTransitions(
  Stream<Transition<Event, State>> transitions,
) {
  return transitions;
}