简体   繁体   English

隐藏 Flutter 上的 iOS 状态栏

[英]Hide the iOS status bar on Flutter

Is there any way to hide the status bar in an iOS application?有什么方法可以隐藏 iOS 应用程序中的状态栏?

I tried with this soluton to do it in Android, but it doesn't work on iOS.我尝试使用此解决方案在 Android 中执行此操作,但它不适用于 iOS。

In addition, I also tried hiding it by using the native iOS way to do it, but the FlutterViewController is being regenerated in every build, so I can't apply the solution described in this other answer .此外,我还尝试通过使用本机 iOS 方式来隐藏它,但是FlutterViewController在每次构建中都会重新生成,因此我无法应用此其他答案中描述的解决方案。

The solution is to call SystemChrome.setEnabledSystemUIOverlays([]);解决方法是调用SystemChrome.setEnabledSystemUIOverlays([]); . .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM