WaveBottomBar constructor

WaveBottomBar({
  1. Key? key,
  2. double? width,
  3. double height = 56.0,
  4. double amplitude = 25,
  5. double waveLength = 100,
  6. Color? backgroundColor,
  7. double? elevation,
  8. Color? shadowColor,
  9. int initialIndex = 0,
  10. required List<BottomNavigationBarItem> items,
  11. Widget? fixedWidget,
  12. WaveBottomBarType type = WaveBottomBarType.normal,
  13. WaveBottomBarDirection direction = WaveBottomBarDirection.up,
  14. WaveBarController? controller,
  15. double selectedLabelMargin = 8,
  16. double unselectedLabelMargin = 4,
  17. double activeTopMargin = -20,
  18. BorderRadius corner = const BorderRadius.all(Radius.zero),
  19. Duration duration = const Duration(milliseconds: 50),
  20. Curve curve = Curves.linear,
  21. TextStyle selectedLabelStyle = const TextStyle(fontSize: 12, color: Colors.blue),
  22. TextStyle unselectedLabelStyle = const TextStyle(fontSize: 12, color: Colors.grey),
  23. bool showSelectedLabel = true,
  24. bool showUnselectedLabel = true,
  25. bool removeBottom = false,
  26. required dynamic onTap(
    1. 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);
  }
}