CustomNavigationBar constructor
const
CustomNavigationBar({
- Key? key,
- required List<
CustomNavigationBarItem> items, - Color? selectedColor,
- Color? unSelectedColor,
- dynamic onTap()?,
- int currentIndex = 0,
- double iconSize = 24.0,
- double scaleFactor = 0.2,
- double elevation = 8.0,
- Radius borderRadius = Radius.zero,
- Color backgroundColor = Colors.white,
- Color strokeColor = Colors.blueAccent,
- Curve bubbleCurve = Curves.linear,
- Curve scaleCurve = Curves.linear,
- bool isFloating = false,
- bool blurEffect = false,
- double opacity = 0.8,
create a CustomNavigationBar
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);