herodotdigital / SnakeBottomNavigationBar

Apache License 2.0
207 stars 51 forks source link

Title has been deprecated in BottomNavigationBarItem. #11

Closed jeet1912 closed 3 years ago

jeet1912 commented 4 years ago

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"), ], )

GoltVik commented 3 years ago

@Jeet1912 Thank you for paying attention to this issue. The new version 0.4.1 + 1 solves this problem.

jeet1912 commented 3 years ago

@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.

GoltVik commented 3 years ago

@Jeet1912 which SnakeShape do you use?

jeet1912 commented 3 years ago

@GoltVik Rectangle

GoltVik commented 3 years ago

@Jeet1912 Thank you. Sorry this was my mistake. Fixed in version 0.4.1+3