Open utterances-bot opened 4 years ago
Thank you your post.
I'm currently developing an application for iPad with Flutter. It is only used on iPad, not on iPhone or Android.
I want to always display the sidebar where Items are arranged like BottomNavigationBar, but when using Navigator.of.push, moving screen with the sidebar disappeared.
I wanna make the transition with the sidebar still displayed as in Twitter for iPad, but if anyone knows how to do it, please let me know.
This is my question in stackoverflow.
The problem you're seeing is because you're using the top-level/root navigator that is associated with the MaterialApp
. Any routes you push will result in a full-page transition as the navigator encompasses the entire app. What you need to look into is having a nested navigator. This navigator that would be wrap around where your details pane would be. You can find a number of articles on using nested navigators online (e.g. with the BottomNavigatorBar so that each tab maintains it's own navigation stack). I also have a package for applications that are looking to only support a master-detail layout https://pub.dev/packages/master_detail_scaffold
Creating a responsive Flutter application using Material Design using a navigation drawer
https://dexterx.dev/creating-a-responsive-flutter-application-with-a-navigation-drawer/