How could I add transition animation when switching pages while using Stacks?
Here is example code which I've been using.
How to use BottomNavigationBar with Navigator?
Currently when you switch pages it's instant and not smooth.
How could I add transition animation when switching pages while using Stacks?
Here is example code which I've been using.
How to use BottomNavigationBar with Navigator?
Currently when you switch pages it's instant and not smooth.
The linked implementation doesn't use any transition/animation.
Since you didn't specified which type of animation you want, I can't provide a simple solution.
However, you can easily implement your own Animation, there is lot of exemple on the official documentation : https://flutter.io/animations/
The code in your examples relies on the Offstage
widget. There is no way to create a transition between offstage positive and negative. That is a case for using routes instead of Offstage
along stacks.
For route changes, animations are implemented by the framework flavor you are using(eg: MaterialApp).
Check this tutorial for a more detailed guide of how to use BottomNavigationBar
along with Routes.