Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to apply transparency in nav? #181

Closed
AllanCoinaski opened this issue Sep 26, 2024 · 2 comments
Closed

How to apply transparency in nav? #181

AllanCoinaski opened this issue Sep 26, 2024 · 2 comments

Comments

@AllanCoinaski
Copy link

AllanCoinaski commented Sep 26, 2024

How to apply transparency in nav?

I have a background with an image, and I would like this image to be visible behind the nav. Is it possible?

I tried to do it the way below. Did I do something wrong?

 PersistentTabView (
    navBarBuilder: (navBarConfig) => Style15BottomNavBar(
    navBarConfig: navBarConfig,
    navBarDecoration: NavBarDecoration(
      borderRadius: BorderRadius.zero,
      color: Colors.transparent,
    ),
  ),
  navBarOverlap: NavBarOverlap.full(),
  controller: _controller,

  tabs: [
    PersistentTabConfig(
        screen: ProfileScreen(),
        item: ItemConfig(
          activeColorSecondary: Colors.white,
          title: "Perfil",
          textStyle: FontsModel.defaultFont.copyWith(fontSize: 12),
          icon: SvgPicture.asset(
            ("assets/icons/person.svg"),
            height: 25,
            color: Colors.white,
          ),
        )),
    PersistentTabConfig(
        screen: HomeScreen(),
        item: ItemConfig(
          activeColorSecondary: Colors.white,
          title: "Home",
          textStyle: FontsModel.defaultFont.copyWith(
            fontSize: 11,
          ),
          icon: SvgPicture.asset(
            ("assets/icons/home.svg"),
            height: 25,
            color: ColorsModel.background,
          ),
        )),
    PersistentTabConfig(
        screen: GalleryScreen(),
        item: ItemConfig(
          activeColorSecondary: Colors.white,
          title: "Pontos",
          textStyle: FontsModel.defaultFont.copyWith(fontSize: 12),
          icon: SvgPicture.asset(
            ("assets/icons/gallery.svg"),
            height: 25,
            color: Colors.white,
          ),
        )),
  ],
  screenTransitionAnimation: ScreenTransitionAnimation(
    curve: Curves.ease,
    duration: Duration(milliseconds: 200),
  ),
);

Output:
Captura de Tela 2024-09-26 às 14 05 47

@jb3rndt
Copy link
Owner

jb3rndt commented Oct 3, 2024

Thank you, there was an error in the package. I just fixed it and everything should work with v5.3.1

@jb3rndt jb3rndt closed this as completed Oct 3, 2024
@AllanCoinaski
Copy link
Author

It worked, thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants