How to hide the Navigation Bar (on the iPhone X) in Flutter

How to hide the Navigation Bar (on the iPhone X) in Flutter



How do I hide the navigation bar, which was introduced to iOS with the iPhone X in Flutter?



iPhone X screen capture



In the image I would want to hide the white bar at the bottom, which is the standard navigation bar for the new iOS version.





Please show what research you've undertaken, what you've already tried, what didn't work, code samples etc. Read How to Ask and Minimal, Complete, and Verifiable example and update your question.
– Ashley Mills
Aug 23 at 19:51





Ive tried searching for it but cannot find anything useful at all. Hence why I am asking here.
– iProgram
Aug 23 at 19:53





@AshleyMills What more information do you expect?
– creativecreatorormaybenot
Aug 23 at 19:59





@creativecreatorormaybenot At least something on how to hide the home indicator. I don't want to just put widgets on top of it. In swift, we override prefersHomeIndicatorAutoHidden
– iProgram
Aug 23 at 20:03


prefersHomeIndicatorAutoHidden





I was defending your post in the regards @AshleyMills critized because I felt like the information you provided was enough.
– creativecreatorormaybenot
Aug 23 at 20:10




1 Answer
1



In Flutter, SystemChrome takes care of it.

The function setEnabledSystemUIOverlays takes a List of the enum SystemUiOverlay, i.e. SystemUIOverlay.bottom, SystemUIOverlay.top, both or none at all.


SystemChrome


setEnabledSystemUIOverlays


List


SystemUiOverlay


SystemUIOverlay.bottom


SystemUIOverlay.top



For your specific case I suggest that calling it in the main function should work fine for a start:


main


SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top]);
runApp(...);



As you can see, I only provided SystemUIOverlay.top, which will consequently disable the bottom part of the system's UI overlay, which is the home indicator on your the new iOS navigation and also the navigation of Android, which is going to be hidden.


SystemUIOverlay.top



I am not aware of all runtime scenarios on iOS, which means that you might need to call SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top]) more often or even provide no elements to the list if full screen mode is required to hide the system navigation.


SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.top])





Thanks for answering. That didn't fix my issue though. See the updated post for more information. I also tried it without the .bottom.
– iProgram
Aug 23 at 20:18





@iProgram My second suggestion should have obviously been to provide an empty List, like this: .
– creativecreatorormaybenot
Aug 23 at 20:20


List






Ive just tried that and still no update.
– iProgram
Aug 23 at 20:23





Ive also tried to but it in my build function.
– iProgram
Aug 23 at 20:37





Thanks for posting it as an issue. So looks like I can't hide it at the moment them. Ive replied back incase other people need to ask questions on the issue.
– iProgram
Aug 23 at 20:48






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế