setStateWithUpdater method

  1. @override
void setStateWithUpdater(
  1. covariant Map? updater(
    1. TState prevState,
    2. TProps props
    ), [
  2. dynamic callback()?
])
override

Triggers a rerender with new state obtained by shallow-merging the return value of updater into the current state.

Optionally accepts a callback that gets called after the component updates.

See: reactjs.org/docs/react-component.html#setstate

Implementation

@override
void setStateWithUpdater(covariant Map? Function(TState prevState, TProps props) updater, [Function()? callback]) {
  final bridge = Component2Bridge.forComponent(this)! as UiComponent2BridgeImpl;
  bridge.setStateWithTypedUpdater(this, updater, callback);
}