Closed Kuroketsu closed 1 year ago
Describe the bug When I use ImageIcon on simple style, the icon rendered is very small
ImageIcon
To Reproduce Steps to reproduce the behavior:
persistent_bottom_nav_bar_v2: ^4.2.6
use simple style
class MyApp extends StatelessWidget { const MyApp({Key key}) : super(key: key); @override Widget build(BuildContext context) { return PersistentTabView( context, controller: _controller, screens: _buildScreens(), items: _navBarsItems(), confineInSafeArea: true, backgroundColor: Colors.white, // Default is Colors.white. handleAndroidBackButtonPress: true, // Default is true. resizeToAvoidBottomInset: true, // This needs to be true if you want to move up the screen when keyboard appears. Default is true. stateManagement: true, // Default is true. hideNavigationBarWhenKeyboardShows: true, // Recommended to set 'resizeToAvoidBottomInset' as true while using this argument. Default is true. decoration: NavBarDecoration( borderRadius: BorderRadius.circular(10.0), colorBehindNavBar: Colors.white, ), popAllScreensOnTapOfSelectedTab: true, popActionScreens: PopActionScreensType.all, itemAnimationProperties: ItemAnimationProperties( // Navigation Bar's items animation properties. duration: Duration(milliseconds: 200), curve: Curves.ease, ), screenTransitionAnimation: ScreenTransitionAnimation( // Screen transition animation on change of selected tab. animateTabTransition: true, curve: Curves.ease, duration: Duration(milliseconds: 200), ), navBarStyle: NavBarStyle.simple, // Choose the nav bar style with this property. ); } }
PersistentBottomNavBarItem _buildNavBarItem(Widget icon, String title, bool hasNotif){ return PersistentBottomNavBarItem( icon: ImageIcon( AssetImage(Assets.images.icHome.path), color: GlobalUtils.hexToColor(activeNavColor), ), inactiveIcon: ImageIcon( AssetImage(Assets.images.icHome.path), color: GlobalUtils.hexToColor(inactiveNavColor), ), title: title, textStyle: GoogleFonts.openSans( fontSize: 12 ), activeColorPrimary: GlobalUtils.hexToColor(activeNavColor), inactiveColorPrimary: GlobalUtils.hexToColor(inactiveNavColor), );
Expected behavior Icon rendered should be same size as when using regular Icon
Icon
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional Context when I use style 3 or 6 it's rendering correctly, but I need the simple style related issue: #20
Yes, I probably have overseen it in this style. Its fixed in Version 4.2.8.
Describe the bug When I use
ImageIcon
on simple style, the icon rendered is very smallTo Reproduce Steps to reproduce the behavior:
persistent_bottom_nav_bar_v2: ^4.2.6
to pubscpecuse simple style
ImageIcon
on icon paramExpected behavior Icon rendered should be same size as when using regular
Icon
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional Context when I use style 3 or 6 it's rendering correctly, but I need the simple style related issue: #20