I am learning about flutter and I tried to make a Splash screen, but when I push other widget(screen), this widget have a pop button at the appbar, how can I remove this button?
Asked
Active
Viewed 152 times
2 Answers
0
To avoid this simply set the automaticallyImplyLeading
property to false when instantiating the AppBar:
AppBar(
automaticallyImplyLeading: false,
// Rest of your code.
);
As pointed out by Niklas, this will remove your drawer button if you are using one.

Mariano Uvalle
- 705
- 4
- 10
-
1Attention, this will also remove your `Drawer` button, if you are using the `drawer` property of the `Scaffold`. – NiklasPor Apr 03 '19 at 07:35
-
I think this solution can fix my problem in a short term! I will try.... Thanks man – Gabriel Gomes Apr 03 '19 at 12:00
0
When you are pushing a new screen from splash screen, at that time don't just push new route but instead replace the splash screen with new screen i.e use
pushReplacementNamed('/route')
which means you will have a single screen on your navigator stack and definitely pop button won't appear in this case.
Hope this will resolve your issue.

Ankit Chouhan
- 33
- 5
-
I tried this but I think that I didn't understand very well whats is "/route", like I put the name of the archive(screen) and didn't work. Do you know what's wrong? – Gabriel Gomes Apr 03 '19 at 12:00
-
In place of '/route' you have to pass your screen name route which you want to open as a landing screen for your app. And please read official document for better understanding of routes and navigation. – Ankit Chouhan Apr 03 '19 at 13:22