do something when state changes flutter code example Example: setstate flutter setState(() { _myState = newValue; });