update method
Change the State value.
This also stores the state value to be retrieved using the undo()
method when using MementoMixin
Implementation
@protected
void update(State newState, {bool force = false}) {
var candidate = _mutableObjects.triple.copyWith(state: newState, event: TripleEvent.state);
candidate = candidate.clearError();
candidate = middleware(candidate);
if (force || (candidate.state != _mutableObjects.triple.state)) {
_mutableObjects.lastState = candidate.copyWith(isLoading: false);
_mutableObjects.triple = candidate;
propagate(_mutableObjects.triple);
}
}