FloatingBottomNavBar constructor

const FloatingBottomNavBar({
  1. Key? key,
  2. required ValueChanged<int> onTap,
  3. int currentIndex = 0,
  4. double? width,
  5. double? bottomPadding = 16,
  6. double? elevation = 3,
  7. double? radius,
  8. Color backgroundColor = const Color(0xFFFFFFFF),
  9. Color darkThemeBackgroundColor = const Color(0xFF292929),
  10. Color? selectedItemColor = const Color(0xFF111111),
  11. Color darkThemeselectedItemColor = const Color(0xFFEFEFEF),
  12. Color? unselectedItemColor = const Color(0xFF767676),
  13. Color darkThemeUnselectedItemColor = const Color(0xFF767676),
  14. required List<IconData> items,
  15. double iconSize = 28,
})

Implementation

const FloatingBottomNavBar({
  Key? key,
  required this.onTap,
  this.currentIndex = 0,
  this.width,
  this.bottomPadding = 16,
  this.elevation = 3,
  this.radius,
  this.backgroundColor = const Color(0xFFFFFFFF),
  this.darkThemeBackgroundColor = const Color(0xFF292929),
  this.selectedItemColor = const Color(0xFF111111),
  this.darkThemeselectedItemColor = const Color(0xFFEFEFEF),
  this.unselectedItemColor = const Color(0xFF767676),
  this.darkThemeUnselectedItemColor = const Color(0xFF767676),
  required this.items,
  this.iconSize = 28,
})  : assert(items.length >= 2, 'Minium 2 items need to specify.'),
      assert(0 <= currentIndex && currentIndex < items.length),
      super(key: key);