refreshWith method
void
refreshWith(
- T newState
Replaces the current state with newState and triggers a widget rebuild.
Implementation
void refreshWith(T newState) {
Reactivity.lastStateKey = uniqueKey;
Reactivity._states[uniqueKey] = BuildState<T>(
uniqueKey: uniqueKey,
state: newState,
);
Reactivity.notifier.updateState(uniqueKey);
}