Flutter: How to animate between pages with BottomNavigationBar - flutter

I'm building an app with multiple pages. There are going to be some common elements. I want to wrap them in Hero() widgets so that they animate from one screen to another.
The problem is that the bottom navigation bar cuts between widgets. The way I currently have it is that I have a Home() widget that has a Scaffold(). The scaffold has a body which returns a widget (different pages) and a BottomNavigationBar(). Is there a way I can make a route be inside of the home's body widget or to add a route animation to the bottom navigation bar or other solutions that could fix this problem?
I don't want to have to make each page have a bottom navigation bar of it's own and route between them and I'd prefer to have the bottom navigation bar inside of the parent widget. How can I achieve this?
Thanks for your help!

I fixed it by having to put a bottom navigation bar in each page. I made it simpler by making a widget for it that takes in the page index so that I can just code it once and just put the widget on each page and write it's index.

Related

above widgets are done by pageview builder and below is listview builder

I want to make it responsive like if I move the slider then correspondent list which is below should be highlighted and should move according to the slider.
I have tried PageView controller to pass in ListView controller but it never worked.

How to show appbar on draggable modal bottom sheet in flutter on full screen mode

I want to create a draggable modal bottom sheet, and when the user scrolls that to full screen, an app bar widget shows on top. Something like this:
But I don't find any package or tutorial for doing that in flutter. Can you show me a sample, please?
hey i think i might able help you but with a theoretical answer.
i think you could achieve this by not actually using the app bar instead make a check that if bottom sheet height is equal to the screen height then you can simply show a app bar type widget inside bottom sheet because back screen app bar won't be visible at that time .

How to make tab bar and tab bar view inside a list view?

I want to make a list, it has three TabBar and TabBarView inside.
The TabBarView is a dynamic listview.builder
Is there a way to make it work without setting fixed height for the list.
Like in the picture instead of #Header, it's a TabBar, and images are TabBarView
My preferred method is to set the hight to equal AnyList.Length multiplied by the height of the widget inside the list.
For example, if the ListView.Builder is used to create a list of containers with height 200. You can set the height to: AnyList.length * 200
You can also use IntrinsicHeight widget, but Flutter documentation about this widget states that "This class is relatively expensive and you should avoid using it where possible."

How do I synchronise Silver Appbar scroll with the list view builder inside it in Flutter

Actually, I'm using a Silver AppBar in Flutter and inside it, I'm using a ListView Builder that has its own scroll. So basically there are two scrolls. But when I scroll List View Builder, Silver AppBar doesn't scroll. I want both of them to scroll from anywhere. What do I do?
Use sliver list istead of list view the problem will solve
here is the link of widget : https://api.flutter.dev/flutter/widgets/SliverList-class.html
You can put NeverScrollableScrollPhysics as a scroll physics for ListView.builder, so AppBar will scroll as with the content, maybe this is what you are looking for.

Animate replacing widget in flutter

I am replacing widgets to navigate. using bottom navigation bar
Following this video tutorial
so when an item is pressed on the nav bar, basically the widget that scaffold's body contains is replaced with another. So is it possible to animate this change ? if so how ? I am a very beginner in flutter.