0

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?

2 Answers2

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
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.

  • 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