Disabling text grow animation for selected BottomNavigationBarItem in Flutter

Viewed 6146

When I tap on BottomNavigationBarItem in my flutter app, I see animation - selected item's font size is increased.

Is there any way to disable it or control this behaviour?

3 Answers

Yes we can do this by setting type to BottomNavigationBarType.fixed

BottomNavigationBar(
    type: BottomNavigationBarType.fixed,
selectedFontSize: fontSize,
unselectedFontSize: fontSize,

Updated answer (2019-09):

You can now set the font size for the selected and unselected labels of BottomNavigationBar, so setting the same size will avoid the animation.

Previous (accepted) answer (2018-12):

I don't think this can be done without creating your own widget, since there's no option to disable the font increasing animation present in Flutter's source.

Related