PersistentBottomNavBar icon indicating copy to clipboard operation
PersistentBottomNavBar copied to clipboard

When using PersistentTabView, the appBar becomes persistent, too!

Open pouria-z opened this issue 4 years ago • 1 comments

Hi, I have a home_page which holds 4 tabs (profile, favorites, search, genres) and a main App Bar for all of them. When I navigate from one of these tabs (favorites_page for example) to an inner page (movie_details_page), which has it's own App Bar with the movie name for title, the App Bar from home_page, navigates to movie_details_page, too. Is there a way to avoid this?

Here's my home_page Scaffold:

Scaffold(
          appBar: AppBar(
            title: Text("MOVIEW"),
            elevation: 0,
          ),
          body: PersistentTabView(
            context,
            confineInSafeArea: true,
            screens: [
              GenresPage(),
              SearchPage(),
              ProfilePage(
                email: moview.email,
                password: moview.password,
                username: moview.username,
              ),
              FavoritesPage(),
            ],
            controller: _controller,
            items: [
              PersistentBottomNavBarItem(
                icon: Icon(Icons.grid_view),
                activeColorPrimary: Theme.of(context).accentColor,
                activeColorSecondary: Colors.white,
                inactiveColorPrimary: Colors.grey,
              ),
              PersistentBottomNavBarItem(
                icon: Icon(Icons.search_rounded),
                activeColorPrimary: Theme.of(context).accentColor,
                activeColorSecondary: Colors.white,
                inactiveColorPrimary: Colors.grey,
              ),
              PersistentBottomNavBarItem(
                icon: Icon(Icons.person),
                activeColorPrimary: Theme.of(context).accentColor,
                activeColorSecondary: Colors.white,
                inactiveColorPrimary: Colors.grey,
              ),
              PersistentBottomNavBarItem(
                icon: Icon(Icons.favorite_border_rounded),
                activeColorPrimary: Theme.of(context).accentColor,
                activeColorSecondary: Colors.white,
                inactiveColorPrimary: Colors.grey,
              ),
            ],
            popActionScreens: PopActionScreensType.all,
            itemAnimationProperties: ItemAnimationProperties(
              duration: Duration(milliseconds: 450),
              curve: Curves.easeInOutQuart,
            ),
            screenTransitionAnimation: ScreenTransitionAnimation(
              animateTabTransition: true,
              duration: Duration(milliseconds: 450),
              curve: Curves.easeInOutQuart,
            ),
            backgroundColor: Theme.of(context).primaryColor,
            hideNavigationBarWhenKeyboardShows: true,
            navBarStyle: NavBarStyle.style3,
          ),
        );

This is my favorite_page tab in home_page:

IMG_20210911_211417

and this is movie_details_page:

IMG_20210911_211554

PS: Please don't judge my UI :) It's just for testing.

pouria-z avatar Sep 11 '21 16:09 pouria-z

Hello - I am facing the same issue. Please help me

KalpeshDz avatar Apr 01 '24 05:04 KalpeshDz