flutter Material示例與MediaQuery.of(context) called with a context that does not contain a MediaQuery.

報錯: flutter MediaQuery.of(context) called with a context that does not contain a MediaQuery. 原因: Scaffold必須放在MaterialApp裏面,否則會報錯 正確示例: import 'package:flutter/material.dart'; main() => runApp(MyApp()
相關文章
相關標籤/搜索