When a stateful widget is born and gets attached to the widget tree, it calls its first method, which is initState(). Here we can initialize variables, data, properties, etc. for any widget.
xxxxxxxxxx
@override
void initState() {
super.initState();
//write your code here
}