Displaying back button in the scaffold
See original GitHub issueThis is more of a feature request and less of a bug/issue.
Problem How to know that the current screen is a top screen and there is no need to show back button. The counter-part of this issue is also true, which would be how to know the current screen has a predecessor or not.
Requested feature There should be a way to know when to show the back button in the scaffold, this way we can show the back button based on the graph dynamically instead of hard-coding it in the scaffold.
Suggestion
Add a method in Navigator
to check if the current screen has a predecessor or not, if it has then it can return true, else false.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Flutter Scaffold Appbar not showing the back button
For the app bar to show a back button there has to be somewhere to go back to ie. there has to be...
Read more >BackButton class - material library - Flutter - Dart API docs
A BackButton is an IconButton with a "back" icon appropriate for the current TargetPlatform. When pressed, the back button calls Navigator.maybePop to return...
Read more >How to Change Back Button Icon in Flutter
In this example, we are going to show you how to change the back button which appears on AppBar while you navigate to...
Read more >Flutter! Handle back button in a flutter Application - Medium
We want to show a pop-up before the close app or close some connection that app using. That can be used to confirm...
Read more >Flutter Scaffold Appbar not showing the back button-Flutter
In order for the back key to come, the part that goes to that page is "Navigator.pushNamed (context, '/ brand new');" For example,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @raamcosta
No, I haven’t tried it with Jetpack Compose Navigation, but I have done it with the Jetpack Navigation library, maybe that’ll give you some insights.
Please refer to these links
With the help of
NavigationUI
API, we can manage the content of the UI components w.r.t navigation from a central location likeMainActivity
.Let me know if this is helpful at all. I am eager to help you guys further if there is any other related point. Peace! ✌️