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.

https://www.fluttercampus.com/guide/63/how-to-run-async-await-code-in-initstate-flutter-app/

Flutter - How to run Async ’await’ Code in initState()
39.10 GEEK