FutureBuilder 报错
来源:6-1 本章目标

慕侠5029079
2021-05-13
老师您好,我自己做了个Windows的桌面应用,报错了,但是在安卓端是没有问题的,麻烦老师帮忙指导下
Performing hot reload…
Syncing files to device Windows…
======== Exception caught by widgets library =======================================================
The following NoSuchMethodError was thrown building LazyApp(dirty, state: _LazyAppState#1da98):
No constructor ‘FutureBuilder.’ with matching arguments declared in class ‘FutureBuilder’.
Receiver: FutureBuilder
Tried calling: new FutureBuilder.()
Found: new FutureBuilder.({Key? key, Future? future, T? initialData, required (BuildContext, AsyncSnapshot) => Widget builder}) => FutureBuilder
Widget creation tracking is currently disabled. Enabling it enables improved error messages. It can be enabled by passing --track-widget-creation
to flutter run
or flutter test
.
When the exception was thrown, this was the stack:
#0 NoSuchMethodError._throwNew (dart:core-patch/errors_patch.dart:212:5)
#1 _LazyAppState.build (package:flutter_lazy/main.dart)
#2 StatefulElement.build (package:flutter/src/widgets/framework.dart:4612:27)
#3 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4495:15)
#4 StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4667:11)
…
Reloaded 4 of 721 libraries in 221ms.
写回答
1回答
-
CrazyCodeBoy
2021-05-14
亲是不是引入了某个插件后报的这个错误呢
00
相似问题