CustomBottomIndicatorBar constructor
CustomBottomIndicatorBar({
- Key? key,
- required ValueChanged<
int> onTap, - required List<
BottomNavigationBarItem> items, - Color? activeColor,
- Color? inactiveColor,
- Color? indicatorColor,
- Color? shadowColor,
- Color? backgroundColor,
- bool shadow = false,
- int currentIndex = 0,
- TextStyle? selectedLabelStyle,
- TextStyle? unselectedLabelStyle,
- IconThemeData? unselectedIconTheme,
- IconThemeData? selectedIconTheme,
- int animationDuration = 180,
- bool? showSelectedLabels,
- bool? showUnselectedLabels,
- double? elevation,
Implementation
CustomBottomIndicatorBar({
Key? key,
required this.onTap,
required this.items,
this.activeColor,
this.inactiveColor,
this.indicatorColor,
this.shadowColor,
this.backgroundColor,
this.shadow = false,
this.currentIndex = 0,
this.selectedLabelStyle,
this.unselectedLabelStyle,
this.unselectedIconTheme,
this.selectedIconTheme,
this.animationDuration = 180,
this.showSelectedLabels,
this.showUnselectedLabels,
this.elevation,
}) : assert(items.length >= 2),
assert(
items.every((BottomNavigationBarItem item) => item.label != null),
'Every item must have a non-null title or label',
),
assert(elevation == null || elevation >= 0.0),
assert(0 <= currentIndex && currentIndex < items.length),
super(key: key);