Is there a way to load async data on InitState method?

Posted by Andre Scott | Updated on

Is there a way to load async data on InitState method? You can use StreamBuilder to do this. This will run the builder method whenever the data in stream changes.

Below is a code snippet from one of my sample projects:

Here is another example to create an async method and call it inside your initState.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers