refresh method
- @mustCallSuper
inherited
It's used to notify listeners that the state has been updated. It is typically called after making changes to the state object.
This method triggers the Lifecycle.didUpdate
event,
which allows listeners to react to the updated state.
Implementation
@mustCallSuper
void refresh() {
assert(!_isDisposed, "You can refresh when it's been disposed");
final _isUpdatingTmp = _isUpdating;
_isUpdating = true;
_notify(Lifecycle.didUpdate);
if (_isUpdatingTmp) return;
_isUpdating = false;
}