Closed jeet1912 closed 3 years ago
@Jeet1912 Thank you for paying attention to this issue. The new version 0.4.1 + 1 solves this problem.
@GoltVik Thank you for maintaining this package really well.
I've another concern. The labels are only displayed when showUnselectedLabels is set to true. However, I'd like to display the labels only when that particular item is selected.It's like the widget doesn't respond to showSelectedLabels. Could you please look into this issue at the earliest?
Thank you.
@Jeet1912 which SnakeShape do you use?
@GoltVik Rectangle
@Jeet1912 Thank you. Sorry this was my mistake. Fixed in version 0.4.1+3
Error : 'package:flutter/src/widgets/text.dart': Failed assertion: line 100 pos 12: 'child != null': is not true. ###
When
showSelectedLabels: true
, the above error was thrown building LayoutBuilder.SnakeNavigationBar( elevation: 10, style: snakeBarStyle, snakeShape: SnakeShape.rectangle, snakeColor: selectionColor, showUnselectedLabels: false, showSelectedLabels: true, currentIndex: _bottomNavIndex, onPositionChanged: (index) => setState(() => _bottomNavIndex = index), items: [ BottomNavigationBarItem( label: "Home", icon: Icon(Icons.home), ), BottomNavigationBarItem( icon: Icon(Icons.favorite), label: "Favorite", ), BottomNavigationBarItem( icon: Icon(Icons.chat), label: "Chat", ), BottomNavigationBarItem( icon: Icon(Icons.account_box), label: 'Account'), BottomNavigationBarItem( icon: ImageIcon( AssetImage( 'assets/images/pet_logo.png', ), size: 70, ), label: "About Us"), ], )