1
votes

I am creating a shopping cart in flutter as my first project. The link to the Cart is inside Appbar.

When I navigate to the Cart the back button on the top left of the Appbar is not showing, instead the drawer button is shown.

For other pages that I navigate say, a product page, the back button is shown.

What could be the issue, please suggest.

1
please add some code what you tried.Viren V Varasadiya
overwrite appbar leading property in cart pageHarsha pulikollu
I am using the below code to navigate to the cart page, new IconButton( icon: Icon(Icons.shopping_cart, color: Colors.white), onPressed: () { Navigator.push(context, MaterialPageRoute( builder: (context) => new Cart() ));ningomba 2.0

1 Answers

0
votes

I compare line by line and the cart.dart have this offending line

drawer: appDrawer

between the appBar and Boxy which seems to override the back button.

@Viren V Varasadiya and @Harsha pulikollu thank you for your looking into my question.