flutter 启动报错

来源:1-2 课程导学

精慕门8879228

2022-03-25

请问下,老师,flutter启动直接报错 Operand of null-aware operation ‘!’ has type ‘WidgetsBinding’ which excludes null.
…/…/src/smart_refresher.dart:513
图片描述
请指点下,谢谢了

写回答

2回答

CrazyCodeBoy

2022-03-25

你新创建一个项目运行也是这个问题吗,如果是的话可以将flutter版本回退到2.10稳定版看看呢

0
0

CrazyCodeBoy

2022-03-25

这是运行的那一节的代码呢,另外flutter doctor检查下环境的截图发我帮你看看哈

0
3
精慕门8879228
Future main() async { await Global.init(); runApp(const MyApp()); SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark); //显示出手机状态栏 } class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); // This widget is the root of your application. @override Widget build(BuildContext context) { return ScreenUtilInit( minTextAdapt: true, splitScreenMode: true, designSize: const Size(375, 1040), builder: () => RefreshConfiguration( headerBuilder: () => const ClassicHeader( refreshingText: '获取新的数据', ), footerBuilder: () => const ClassicFooter( noDataText: '我是有底线', ), hideFooterWhenNotFull: true, headerTriggerDistance: 80, maxOverScrollExtent: 100, footerTriggerDistance: 50, child:
2022-03-25
共3条回复

Flutter高级进阶实战-仿哔哩哔哩-掌握Flutter高阶技能

一次性掌握Flutter高阶技能+商业级复杂项目架构设计与开发方案

1722 学习 · 870 问题

查看课程