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);
                },
              ),

 

posted @ 2020-11-24 14:42  安徽胡峻  阅读(1447)  评论(0编辑  收藏  举报