CustomNavigationBar constructor

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

Implementation

const CustomNavigationBar(
    {Key? key,
    required this.items,
    this.selectedColor,
    this.unSelectedColor,
    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})
    : assert(items != null),
      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);