📜  flutter async initstate - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:02.649000             🧑  作者: Mango

代码示例1
@override
void initState() {
  super.initState();
  asyncMethod();        // async is not allowed in initState()
}

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