setState method
Notify the framework that the internal state of this object has changed.
Whenever you change the internal state of a State object, make the change in a function that you pass to setState:
setState(() { _myState = newValue; });
Implementation
@override
void setState(VoidCallback fn) {
if (!mounted) return;
super.setState(fn);
}