BottomBar constructor

const BottomBar({
  1. Key? key,
  2. required int selectedIndex,
  3. Curve curve = Curves.easeOutQuint,
  4. Duration duration = const Duration(milliseconds: 750),
  5. num? height,
  6. EdgeInsets padding = const EdgeInsets.all(10),
  7. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.spaceBetween,
  8. Color? backgroundColor,
  9. bool showActiveBackgroundColor = true,
  10. ShapeBorder border = const StadiumBorder(),
  11. EdgeInsets itemPadding = const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
  12. required List<BottomBarItem> items,
  13. required ValueChanged<int> onTap,
  14. TextStyle textStyle = const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
})

Creates a BottomBar that displays a list of BottomBarItem

Animations will play once a BottomBarItem is clicked

Implementation

const BottomBar({
  Key? key,
  required this.selectedIndex,
  this.curve = Curves.easeOutQuint,
  this.duration = const Duration(milliseconds: 750),
  this.height,
  this.padding = const EdgeInsets.all(10),
  this.mainAxisAlignment = MainAxisAlignment.spaceBetween,
  this.backgroundColor,
  this.showActiveBackgroundColor = true,
  this.border = const StadiumBorder(),
  this.itemPadding = const EdgeInsets.symmetric(vertical: 10, horizontal: 16),
  required this.items,
  required this.onTap,
  this.textStyle = const TextStyle(fontSize: 14, fontWeight: FontWeight.w500),
}) : super(key: key);