update method

void update(
  1. FlowCallback<T> callback
)

update can be called to update the current flow state. update takes a closure which exposes the current flow state and is responsible for returning the new flow state.

When update is called, the builder method of the corresponding FlowBuilder will be called with the new flow state.

Implementation

void update(FlowCallback<T> callback) {
  _state = callback(_state);
  notifyListeners();
}