I want to disable the Bottom Navigation Bar animation for selected item to get the same text/icon size of unselected items.
That's my code:
class BottomNavigationBarHome extends StatelessWidget {
@override
Widget build(BuildContext context) {
return BottomNavigationBar(
unselectedItemColor: Colors.black38,
backgroundColor: Colors.white,
items: [
BottomNavigationBarItem(
icon: Icon(BalanceIcon.scale_balance, size: 15.0),
title: Text('Item 1', style: TextStyle(
),)
),
BottomNavigationBarItem(
icon: Icon(BalanceIcon.scale_balance),
title: Text('Item 2')
),
BottomNavigationBarItem(
icon: Icon(BalanceIcon.scale_balance),
title: Text('Item 3')
),
]
);
}
}
I have already tried setting the same font size, the animation is still here
You can try add type to BottomNavigationBar
BottomNavigationBar(
type: BottomNavigationBarType.fixed,
...
)
Add selectedFontSize & unselectedFontSize in BottomNavigationBar
and set the same font sizes
BottomNavigationBar(
selectedFontSize: 15.0,
unselectedFontSize: 15.0,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With