BilalShahid13 / PersistentBottomNavBar

A highly customizable persistent bottom navigation bar for Flutter
BSD 3-Clause "New" or "Revised" License
528 stars 395 forks source link

How to modify padding between text and assets img in Item? #369

Open Tommy-Wang0602 opened 3 months ago

Tommy-Wang0602 commented 3 months ago

截圖 2024-08-02 晚上7 52 23.

issue description: I use svg img to be PersistentBottomNavBarItem icon arg, however I can't find any solution to modify the padding after using title arg

assets code : SvgPicture.asset( 'assets/bottom_nav_icon/svg_icons/dashboard_24dp_unselected.svg', height: imgSizeHeight, width: imgSizeWidth, fit: BoxFit.contain, );

PersistentBottomNavBarItem code : PersistentBottomNavBarItem( icon: BottomNavSvgIcons.baseSelected, inactiveIcon: BottomNavSvgIcons.baseUnselect, title: "Base", contentPadding: 0, activeColorPrimary: AppCustomColor.primaryColor, inactiveColorPrimary: AppCustomColor.defaultGrayColor),

PersistentTabView code:PersistentTabView( padding: const EdgeInsets.all(0), margin: const EdgeInsets.all(0), isVisible: true, context, controller: _controller, stateManagement: true, confineToSafeArea: true, navBarStyle: NavBarStyle.style15, resizeToAvoidBottomInset: false, items: _items, screens: _screens, animationSettings: const NavBarAnimationSettings( screenTransitionAnimation: ScreenTransitionAnimationSettings(screenTransitionAnimationType: ScreenTransitionAnimationType.slide, animateTabTransition: true)), onItemSelected: (index) { setState(() { _controller.index = index; }); }, );