flutter update state from button code example Example: setstate flutter setState(() { _myState = newValue; });