flutter 顶部状态栏 底部栏 显示和隐藏


        RaisedButton(
                child: Text('顶部 底部 状态栏都不显示'),
                onPressed: () {
                  SystemChrome.setEnabledSystemUIOverlays([]);
                },
              ),
              RaisedButton(
                child: Text('只显示顶部状态栏'),
                onPressed: () {
                  SystemChrome.setEnabledSystemUIOverlays(
                      [SystemUiOverlay.top]);
                },
              ),
              RaisedButton(
                child: Text('只显示底部状态栏'),
                onPressed: () {
                  SystemChrome.setEnabledSystemUIOverlays(
                      [SystemUiOverlay.bottom]);
                },
              ),
              RaisedButton(
                child: Text('顶部 底部 都显示状态栏'),
                onPressed: () {
                  SystemChrome.setEnabledSystemUIOverlays(
                      SystemUiOverlay.values);
                },
              ),

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM