@override
void initState() {
// initState 必须调用 super.initState(); 否则报错:info: This method overrides a method annotated as @mustCallSuper in 'State', but does not invoke the overridden method. (must_call_super at [qutoutiao_flutter] lib/routes/home/FeedList.dart:14)
super.initState();
_retrieveData();
}
initState 必须调用 super.initState(); 否则报错
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
flutter中initState(),实现异步操作
flutter中initState(),实现异步操作
异步操作 数据 网络请求 flutter -
Flutter开发 - initState中使用context,context为null的解决办法
initState是flutter生命周期中重要的一环,类似于iOS中viewWillAppera,是页面创建前初始化的一个必经步骤。在这个步骤中,我们可能要先去准备一些数据) async { ///使用带
context context为 null flutter initState