當我使用智能手機模擬器啟動我的應用程式時,底部會出現一個空白:

我試圖在我的 Scaffold 中添加這一行,但似乎不起作用:
resizeToAvoidBottomInset: false
uj5u.com熱心網友回復:
看起來空白來自您的設備導航欄。
嘗試設定 SystemChrome.setEnabledSystemUIMode()為手動設定您想要的 ui 疊加層。
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setEnabledSystemUIMode(
SystemUiMode.manual,
overlays: [SystemUiOverlay.top],
);
runApp(AppWidget());
}
或設定overlays: [],為全屏
檔案:https ://api.flutter.dev/flutter/services/SystemChrome/setEnabledSystemUIMode.html
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/409977.html
標籤:
下一篇:顫振,GetXinitState
