BottomNavigationItem constructor
BottomNavigationItem({})
Animation Object to design and the animation as you wish.
Implementation
//Animation<double> _animation;
BottomNavigationItem({
Color? color,
String? title,
Duration? duration,
required Widget activeIcon,
required Widget inActiveIcon,
required TickerProvider vSync,
}) :
controller = AnimationController(
vsync: vSync,
duration: (duration != null && !duration.isNegative)
? duration
: kThemeAnimationDuration,
reverseDuration: duration,
),
item = BottomNavigationBarItem(
icon: inActiveIcon,
activeIcon: activeIcon,
label: title != null && title.isNotEmpty ? title : '',
backgroundColor: color ?? Colors.white70,
) {
/*_animation =*/
controller.drive(
CurveTween(
curve: const Interval(0.1, 1.0, curve: Curves.fastOutSlowIn),
),
);
}