Can initState be async?

In this example, we are going to show the way to run or call asynchronous functions, codes inside initState() in Flutter Apps. Sometimes, you may need to execute async code while initializing app. But Flutter will show an error if you add ‘async’ modifier to initState . See the example below to solve this issue.

Sizin İçin Seçtik  How do you deal with null safety in flutter?

Leave a Reply

Your email address will not be published. Required fields are marked *