update method Null safety

void update(
  1. T callback(
    1. T

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.


void update(T Function(T) callback) {
  _notifier.value = callback(_notifier.value);