how to test setstate in flutter code example
Example 1: initstate flutter
void initState() {
super.initState();
///whatever you want to run on page build
}
Example 2: setstate flutter
setState(() { _myState = newValue; });
void initState() {
super.initState();
///whatever you want to run on page build
}
setState(() { _myState = newValue; });