WaveBottomBar constructor
WaveBottomBar({
- Key? key,
- double? width,
- double height = 56.0,
- double amplitude = 25,
- double waveLength = 100,
- Color? backgroundColor,
- double? elevation,
- Color? shadowColor,
- int initialIndex = 0,
- required List<
BottomNavigationBarItem> items, - Widget? fixedWidget,
- WaveBottomBarType type = WaveBottomBarType.normal,
- WaveBottomBarDirection direction = WaveBottomBarDirection.up,
- WaveBarController? controller,
- double selectedLabelMargin = 8,
- double unselectedLabelMargin = 4,
- double activeTopMargin = -20,
- BorderRadius corner = const BorderRadius.all(Radius.zero),
- Duration duration = const Duration(milliseconds: 50),
- Curve curve = Curves.linear,
- TextStyle selectedLabelStyle = const TextStyle(fontSize: 12, color: Colors.blue),
- TextStyle unselectedLabelStyle = const TextStyle(fontSize: 12, color: Colors.grey),
- bool showSelectedLabel = true,
- bool showUnselectedLabel = true,
- bool removeBottom = false,
- required dynamic onTap(
- int index
Implementation
WaveBottomBar({
Key? key,
this.width,
this.height = 56.0,
this.amplitude = 25,
this.waveLength = 100,
this.backgroundColor,
this.elevation,
this.shadowColor,
this.initialIndex = 0,
required this.items,
this.fixedWidget,
this.type = WaveBottomBarType.normal,
this.direction = WaveBottomBarDirection.up,
this.controller,
this.selectedLabelMargin = 8,
this.unselectedLabelMargin = 4,
this.activeTopMargin = -20,
this.corner = const BorderRadius.all(Radius.zero),
this.duration = const Duration(milliseconds: 50),
this.curve = Curves.linear,
this.selectedLabelStyle = const TextStyle(
fontSize: 12,
color: Colors.blue,
),
this.unselectedLabelStyle = const TextStyle(
fontSize: 12,
color: Colors.grey,
),
this.showSelectedLabel = true,
this.showUnselectedLabel = true,
this.removeBottom = false,
required this.onTap,
}) : super(key: key) {
if (type == WaveBottomBarType.fixed) {
assert(items.length % 2 != 0);
}
}