Flutter why is Navigator changing colour of Scaffold beneath transparent Widget

Viewed 38

Q) Why in this DartPad is the transparent page not showing solid blue like the BottomNavigationBar, which is also transparent?

Edit: This is just to illustrate the problem that is occurring on my iOS device + simulator.

Edit2: This was working fine in Flutter V2, now not so much in Flutter V3!

  • Explanation:

I've got a persistent BottomNavigationBar and I'm wrapping each tab's page with its own 'Navigator', so I can have individual page stacks. That's all fine.

However, in this example, I want my pages to be transparent and show the colour behind, which is wrapping the whole screen.

  • To demonstrate:

If you go to line 156 - you can toggle between: return _page!; and return Visibility(...

Screenshot bad:

enter image description here

Screenshot good:

enter image description here

2 Answers

Seems to be like a problem with dartpad renderer. I ran your code in Android studio and both returned the same UI. Adding images for your referencepreview1

preview2

Related