AdaptiveNavBar constructor

AdaptiveNavBar({
  1. Key? key,
  2. required List<NavItem> items,
  3. double height = 65.0,
  4. double iconSize = 24.0,
  5. double selectedFontSize = 14.0,
  6. double unselectedFontSize = 12.0,
  7. bool showLabels = true,
  8. bool showSelectedLabels = true,
  9. bool showUnselectedLabels = true,
  10. Color? backgroundColor,
  11. Color? selectedItemColor,
  12. Color? unselectedItemColor,
  13. NotchedShape? notchedShape,
  14. double elevation = 8.0,
  15. BorderRadius? borderRadius,
  16. Duration animationDuration = const Duration(milliseconds: 300),
  17. Curve animationCurve = Curves.easeOutCubic,
})

Implementation

AdaptiveNavBar({
  Key? key,
  required this.items,
  this.height = 65.0,
  this.iconSize = 24.0,
  this.selectedFontSize = 14.0,
  this.unselectedFontSize = 12.0,
  this.showLabels = true,
  this.showSelectedLabels = true,
  this.showUnselectedLabels = true,
  this.backgroundColor,
  this.selectedItemColor,
  this.unselectedItemColor,
  this.notchedShape,
  this.elevation = 8.0,
  this.borderRadius,
  this.animationDuration = const Duration(milliseconds: 300),
  this.animationCurve = Curves.easeOutCubic,
})  : controller = Get.put(NavigationController()),
      assert(items.length >= 2, 'At least 2 items are required'),
      assert(items.length <= 5, 'Maximum 5 items are allowed'),
      super(key: key);