setState method

dynamic setState (
  1. dynamic fn(
    1. S state1
    ),
  2. [VoidCallback finished]
)

Implementation

setState(fn(S state1), [VoidCallback finished]) {
  fn(this.state);
  rerender(this);
  if (finished != null) {
    finished();
  }
}