Another method would be to create an async method and call it from your initState ( ) a method is shown below: @override void initState() { super. initState(); asyncMethod(); } void asyncMethod() async { await asyncCall1(); await asyncCall2(); // …. }30 Haz 2021
Read moreCan Flutter build be async?
Async patterns to your Flutter application. Widget that builds itself based on the latest snapshot of interaction with a Future. …
Read moreCan initState be async Flutter?
Sometimes, you may need to execute async code while initializing app. But Flutter will show an error if you add ‘async’ modifier to initState .
Read more