initstate example flutter
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; });