jb3rndt / PersistentBottomNavBarV2

A highly customizable persistent bottom navigation bar for Flutter
https://pub.dev/packages/persistent_bottom_nav_bar_v2
BSD 3-Clause "New" or "Revised" License
49 stars 54 forks source link

[5.0.0-beta.4] Black bar beneath BottomNavigationBar #88

Closed jasonlessenich closed 1 year ago

jasonlessenich commented 1 year ago

Hey, I just upgraded to the newest beta and noticed a black bar beneath my bottom navigation bar - despite the backgrounColor being set to white.

Screenshot 2023-02-16 at 16 42 52

My setup looks something like this:

@override
  Widget build(BuildContext context) {
    final List<PersistentTabConfig> tabs = [...]
    return SafeArea(
      top: false,
      child: PersistentTabView(
        controller: _tabController,
        tabs: tabs,
        drawer: _buildDrawer(),
        drawerEdgeDragWidth: MediaQuery.of(context).size.width / 3,
        navBarBuilder: (config) {
          return ButtonBottomNavigationBar(
              config: config,
              selectedIndex: _tabController.index
             );
        },
      ),
    );
  }
jasonlessenich commented 1 year ago

I got it fixed by surrounding the SafeArea with another Scaffold - As its written everywhere to not use another Scaffold, i'll leave this open, as this may be a potential bug then

jasonlessenich commented 1 year ago

Okay, still got some issues tho: somehow, the Drawers' (shadow) clips beneath the navbar. Is there a way to extend the navbar to the bottom or to just display the Drawer on top of the scaffold? This would probably also fix the black bar thingy.

Screenshot 2023-02-16 at 20 48 22

(Setting the elevation to 0 works, but isnt really ideal ig)

ZahraVe commented 1 year ago

@DynxstyGIT You can try to remove SafeArea wrapped around PersistentTabView and instead set confineInSafeArea: true inside the PersistentTabView.

jasonlessenich commented 1 year ago

Hey, thanks for the reply - I can't find such parameter in the current beta. Was it removed?

jb3rndt commented 1 year ago

It got renamed to avoidBottomPadding. It should solve your issue.