Because we can’t call setState() directly in the initState method , we can’t call it from a function called by initState either. Unless this function is asynchronous and the setState call is made after the first await.
Read moreHow many times is initState called Flutter?
3. initState() This is the first method called when the widget is created (after the class constructor, of course.) initState is called once and only once .
Read more