0

I am developing a kind of Twitter with Flutter, and I am encountering a problem with pageView.builder.

I want to create the same profile navigation that Twitter and Instagram are using : I mean I have a NestedScrollView which is my FeedPage and it contains a List of post tiles. The feature I want is when I click on a tile, pageView build the user profile associated and show up as Twitter does. I used a Navigator.push whichs leads to the user concerned but it doesn't keep my BottomAppBar.

Images are better than words : Illustration

Thanks for your futur help and have a nice day !

1 Answers1

0

There is a package in the pub to have a persistent bottom navigation: https://pub.dev/packages/persistent_bottom_nav_bar.

Ayad
  • 671
  • 5
  • 16
  • Yeah I've already try this solution but it doesn't have the result excepted, what I want is to have my FeedPage as the First item of my PageView and to build other item as ProfilePage – Naïm Youssouf Feb 05 '21 at 11:58
  • I'm not sure exactly what you mean. You want to have the main Widget to change for the profile Widget when you select the list item? – Ayad Feb 05 '21 at 12:17
  • Exactly, like Twitter, on the feed page, when you click on a tweet it leads you to the profile of the user. FeedPage ( click on a post ) --> User1 Profile, if this User1 reposted something from User2, when I click on User2 post I want to be redirected to his profile page. And whatever deep I am, I have my feed button on my BottomAppBar to bring me back to my feed. All I see to have this kind of behavior it to use callback and use PageController but I don't know how :(. Thanks for your help mate – Naïm Youssouf Feb 05 '21 at 12:36
  • I found I kind of solution with callBack – Naïm Youssouf Feb 07 '21 at 11:58
  • Up because my solution doesn't work when I'm trying to get back to my page 0 :(( – Naïm Youssouf Feb 14 '21 at 22:34