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|Flutter :MediaQuery.of() called with a context that does not contain a MediaQuery
文章图片

    推荐阅读