flutter async initstate

64

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

void asyncMethod() async {
  await asyncCall1();
  await asyncCall2();
  // ....
}

Comments

Submit
0 Comments