How to hide Android StatusBar in Flutter

后端 未结 10 1449
遥遥无期
遥遥无期 2020-12-01 03:22

How to hide the Android Status Bar in a Flutter App?

10条回答
  •  难免孤独
    2020-12-01 03:59

    You can use SystemChrome.setEnabledSystemUIOverlays([]) to hide and SystemChrome.setEnabledSystemUIOverlays(SystemUiOverlay.values) to bring it back again.

    However, there will be slight grey area and there is not fix for this as of right now. When status bar is hidden, app bar's height remains the same.

    See the github issue: https://github.com/flutter/flutter/issues/14432

提交回复
热议问题