Answers for "async await in initstate flutter"

1

flutter async initstate

@override
void initState() {
  super.initState();
  asyncMethod();		// async is not allowed in initState()
}

void asyncMethod() async {
  await asyncCall1();
  await asyncCall2();
  // ....
}
Posted by: Guest on May-21-2021

Code answers related to "Dart"

Browse Popular Code Answers by Language