OneUIBottomNavigationBar constructor

const OneUIBottomNavigationBar({
  1. Key? key,
  2. required List<OneUIBottomNavigationBarItem> items,
  3. ValueChanged<int>? onTap,
  4. int currentIndex = 0,
  5. Color? fixedColor,
  6. Color? backgroundColor,
  7. Color? selectedItemColor,
  8. Color? unselectedItemColor,
  9. TextStyle? selectedLabelStyle,
  10. TextStyle? unselectedLabelStyle,
  11. MouseCursor? mouseCursor,
  12. bool? enableFeedback,
  13. double fontSize = 14.0,
})

Implementation

const OneUIBottomNavigationBar({
  Key? key,
  required this.items,
  this.onTap,
  this.currentIndex = 0,
  Color? fixedColor,
  this.backgroundColor,
  Color? selectedItemColor,
  this.unselectedItemColor,
  this.selectedLabelStyle,
  this.unselectedLabelStyle,
  this.mouseCursor,
  this.enableFeedback,
  this.fontSize = 14.0,
})  : assert(items.length >= 2),
      assert(0 <= currentIndex && currentIndex < items.length),
      assert(selectedItemColor == null || fixedColor == null,
          'Either selectedItemColor or fixedColor can be specified, but not both'),
      assert(fontSize >= 0.0),
      selectedItemColor = selectedItemColor ?? fixedColor,
      super(key: key);