Conditionally hide status bar if app is in landscape mode
In Related question, app can hide the status bar with SystemChrome.setEnabledSystemUIOverlays([]); But if I surround that with a media query to detect orientation in the main app, it causes the app to error because there is no material ancestor widget. // app error if (MediaQuery.of(context).orientation == Orientation.landscape) { SystemChrome.setEnabledSystemUIOverlays([]); } Is there a way to conditionally hide the status bar in Flutter for the entire app, if the device rotates to landscape mode?
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.