CNav constructor

CNav({
  1. Key? key,
  2. required List<CNavItem> items,
  3. EdgeInsetsGeometry? margin,
  4. EdgeInsetsGeometry? padding,
  5. Color? selectedColor,
  6. Color? unSelectedColor,
  7. required dynamic onTap(
    1. int
    ),
  8. int currentIndex = 0,
  9. double iconSize = 24.0,
  10. double scaleFactor = 0.2,
  11. double elevation = 8.0,
  12. Radius borderRadius = Radius.zero,
  13. Color backgroundColor = Colors.white,
  14. Color strokeColor = Colors.blueAccent,
  15. Curve bubbleCurve = Curves.linear,
  16. Curve scaleCurve = Curves.linear,
  17. bool isFloating = false,
  18. bool blurEffect = false,
  19. double opacity = 0.8,
  20. double floatingPadding = 0.0,
})

Implementation

CNav({
  Key? key,
  required this.items,
  this.margin,
  this.padding,
  this.selectedColor,
  this.unSelectedColor,
  required this.onTap,
  this.currentIndex = 0,
  this.iconSize = 24.0,
  this.scaleFactor = 0.2,
  this.elevation = 8.0,
  this.borderRadius = Radius.zero,
  this.backgroundColor = Colors.white,
  this.strokeColor = Colors.blueAccent,
  this.bubbleCurve = Curves.linear,
  this.scaleCurve = Curves.linear,
  this.isFloating = false,
  this.blurEffect = false,
  this.opacity = 0.8,
  this.floatingPadding = 0.0,
})  : assert(scaleFactor <= 0.5, 'Scale factor must smaller than 0.5'),
      assert(scaleFactor > 0, 'Scale factor must bigger than 0'),
      assert(0 <= currentIndex && currentIndex < items.length),
      super(key: key);