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()

相关推荐
迷雾漫步者11 分钟前
Flutter组件————PageView
flutter·跨平台·dart
迷雾漫步者8 小时前
Flutter组件————FloatingActionButton
前端·flutter·dart
coder_pig12 小时前
📝小记:Ubuntu 部署 Jenkins 打包 Flutter APK
flutter·ubuntu·jenkins
捡芝麻丢西瓜14 小时前
flutter自学笔记5- dart 编码规范
flutter·dart
恋猫de小郭15 小时前
什么?Flutter 可能会被 SwiftUI/ArkUI 化?全新的 Flutter Roadmap
flutter·ios·swiftui
sunly_2 天前
Flutter:导航,tab切换,顶部固定,列表分页滚动
开发语言·javascript·flutter
敲代码的小强2 天前
Flutter项目兼容鸿蒙Next系统
flutter·华为·harmonyos
Zh-jie2 天前
flutter 快速实现侧边栏
前端·javascript·flutter
truemi.733 天前
flutter --no-color pub get 超时解决方法
android·flutter
王家视频教程图书馆3 天前
flutter 使用dio 请求go语言后台数据接口展示瀑布流图片
flutter