write<T> method

  1. @protected
  2. @nonVirtual
void write<T>(
  1. StateRef<T> ref,
  2. T state, [
  3. Object? action
])

Updates the value of the state referenced by ref with state.

An optional action can be send to track which method did the update.

Implementation

@protected
@nonVirtual
void write<T>(StateRef<T> ref, T state, [Object? action]) {
  scope.write(ref, state, action);
}