redux - 运行应用程序时遇到错误
问题描述
我是flutter的新手,在使用flutter run
命令运行应用程序时,它给了我这个错误。
The following StoreProviderError was thrown building StoreConnector<dynamic, dynamic>(dirty):
I/flutter ( 2958): Error: No StoreProvider<dynamic> found. To fix, please try:
I/flutter ( 2958):
I/flutter ( 2958): * Using Dart 2 (required) by using the --preview-dart-2 flag
I/flutter ( 2958): * Wrapping your MaterialApp with the StoreProvider<State>,
I/flutter ( 2958): rather than an individual Route
I/flutter ( 2958): * Providing full type information to your Store<State>,
I/flutter ( 2958): StoreProvider<State> and StoreConnector<State, ViewModel>
I/flutter ( 2958): * Ensure you are using consistent and complete imports.
I/flutter ( 2958): E.g. always use `import 'package:my_app/app_state.dart';
有人可以帮我解决这个问题。
扑医生报告:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.5.1, on Microsoft Windows [Version 6.1.7601], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK 28.0.0)
[√] Android Studio (version 3.1)
[!] VS Code, 64-bit edition (version 1.24.1)
[√] Connected devices (1 available)
解决方案
推荐阅读
- java - 我想从下拉列表中添加国家代码
- html - 将文本颜色应用于 HTML 列
- android-layout - 无法在其他文本视图的底部设置文本视图
- javascript - AngularFire2 / Firestore 存储 - getDownloadURL() (Ionic)
- python - Reedsolomon 多项式系数解码返回空字节数组
- javascript - 获取 html 和 js 天气 api 请求以在节点中工作。在我上传到节点之前它可以工作
- python - PyQT5 标签的鼠标悬停事件
- laravel - 更新数据时出现 QueryException 错误
- python-3.x - InvalidArgumentError:您必须使用 dtype float 为占位符张量“Placeholder_56”提供一个值
- c# - 在 c#/WPF 中绑定子类 (DataContext = obj) (Binding subclass.var}