【发布时间】:2021-09-01 11:30:14
【问题描述】:
Flutter - 有没有办法在 InitState 上加载异步方法?我想在 iniState() 中调用异步方法;但它不起作用......
我正在寻找一种在 InitState 方法上加载异步数据的方法,在构建方法运行之前我需要一些数据。我需要执行构建方法直到 Stream 运行。
@override
void initState () {
super.initState();
//here i want to call async function
}
【问题讨论】: