Flutter报错信息Unhandled Exception: Binding has not yet been initialized.

错误信息如下:

Typically, this is done by calling "WidgetsFlutterBinding.ensureInitialized()" or "runApp()" (the latter calls the former). Typically this call is done in the "void main()" method. The "ensureInitialized" method is idempotent; calling it multiple times is not harmful.

需要在调用之前初始化

WidgetsFlutterBinding.ensureInitialized()

相关推荐
君赏3 天前
棉宇宙 Flutter 热更新是如何落地的
flutter
恋猫de小郭3 天前
AndroidX 新增 Security State ,支持可编程的系统安全状态查询
android·前端·flutter
zihan5183 天前
自己做软件日记9/21 得到了一个良好的文件结构框架
后端·flutter·前端框架·android studio
ZFJ_张福杰4 天前
【Flutter】Flutter 中有哪些耗时操作?从 UI 卡顿到 Isolate 性能优化
flutter·性能优化·卡顿·isolate
sakiko_4 天前
Flutter:Dart学习笔记1:基础UI组件等
flutter
9765033354 天前
iOS 上架 4.3a 被拒【uniapp专讲】
flutter·ios·objective-c·uniapp·swift
传奇开心果编程5 天前
【Flutter入门练中学】第2课:布局系统
学习·flutter·ui
君赏5 天前
FlutterPatch:把 Shorebird 热更新的控制面搬回自己服务器
flutter
用户2181697049305 天前
Flutter tootip 轻量级提示
flutter
用户2181697049305 天前
Flutter 拖拽 Draggable DragTarget
flutter