Flutter|Flutter :MediaQuery.of() called with a context that does not contain a MediaQuery
在运行flutter写的基本页面的时候报错 (Flutter :MediaQuery.of() called with a context that does not contain a MediaQuery)
意思是你使用不包含mediaquery的上下文调用mediaquery.of()。
【Flutter|Flutter :MediaQuery.of() called with a context that does not contain a MediaQuery】解决方案:MaterialApp()中包裹你写好的页面即可
文章图片
推荐阅读
- Flutter的ListView
- 运用flutter|运用flutter 构建一个发布版(release)APK
- Flutter自定义view|Flutter自定义view —— 闯关进度条
- Flutter|Flutter SwiftUI React 对比
- flutter设置沉浸式状态栏
- 2019-12-02|2019-12-02 flutter的环境配置
- Flutter开发之布局Widget
- JS开发者值得一看的Flutter入门
- 写一个TODO|写一个TODO App学习Flutter数据库工具Moor
- Flutter入门-环境搭建