replaceState method
- @Deprecated('Use setState instead.')
- Map? newState, [
- dynamic callback()?
inherited
Set _nextState
to provided newState
value and force a re-render.
Optionally accepts a callback that gets called after the component updates.
Implementation
@Deprecated('Use setState instead.')
void replaceState(Map? newState, [Function()? callback]) {
final nextState = newState == null ? {} : Map.from(newState);
_nextState = nextState;
if (callback != null) _setStateCallbacks.add(callback);
_jsRedraw();
}