setState method

  1. @protected
void setState([
  1. VoidCallback? fn
])

Notify the widget that the internal state of widget model has changed.

setState(() { _value = newValue; });
_value = newValue;
setState();

Implementation

@protected
void setState([VoidCallback? fn]) {
  fn?.call();

  (context as CuteElement).markNeedsBuild();
}