Home > Software engineering >  Why I'm getting two app bar in home screen in flutter?
Why I'm getting two app bar in home screen in flutter?

Time:02-03

I have made multiple screens and these screen have separate appBar in flutter but my home Screen getting two appBar! How can remove it in flutter?

I have tried several things but I'm still getting two screen.

Here is image link enter image description here

CodePudding user response:

Please post the entire Scaffold code if you need to pinpoint the anomaly. The code you shared isn't enough to find the bug since its above this tree level. However from my experience,

Guess 1: You have implemented Home screen with AppBar and Category is a sub widget of Home screen and has its AppBar.

Guess 2: You have implemented AppBar in appBar and body of Scaffold.

Do check and update your question. Thanks!

CodePudding user response:

You are using the Bottom Navigation which is causing the issue. The Bottom navigation page contains a Scaffold with an AppBar and the other screen you are using has a separate AppBar. To resolve the issue you either need to remove the AppBar from the Bottom Navigation Screen or remove the AppBar from the individual screen.

  • Related