I’m developing for Android/iOS and have stumbled upon one problem.
Even if another screen displayed by Navigator.push()
or something like the image below, I want the specified widget to continue to be displayed at the bottom.
This means that I want to apply only to the range specified by Navigator.push() instead of moving to another widget such as Hero.
I just want the banner ad to always appear at the bottom of the screen.
Can someone please tell me?
3
Answers
You can wrap your whole app in a stack widget and position your ad in the bottom of your app, and design your app accordingly.
Or you can use a custom widget for all scaffold body
Use this widget as the body of your scaffold, and manage your ad in this widget.
You can just write a custom BottomAppBar which is the equivalent of the AppBar just at the bottom of your screens.
On every screen you can then insert it with the constructor funtion as in:
There are 2 solutions:
In this way you will swap just the pages. Or The better way (in my opinion), using Pageviewer:
(So you can use this instead of Test7):
Good luck!