CurvedNavigationBar constructor
CurvedNavigationBar({
- Key? key,
- required List<
CurvedNavigationBarItem> items, - int index = 0,
- Color color = Colors.white,
- Color? buttonBackgroundColor,
- Color backgroundColor = Colors.blueAccent,
- ValueChanged<
int> ? onTap, - _LetIndexPage? letIndexChange,
- Curve animationCurve = Curves.easeOut,
- Duration animationDuration = const Duration(milliseconds: 600),
- double iconPadding = 12.0,
- double? maxWidth,
- double? height,
Implementation
CurvedNavigationBar({
Key? key,
required this.items,
this.index = 0,
this.color = Colors.white,
this.buttonBackgroundColor,
this.backgroundColor = Colors.blueAccent,
this.onTap,
_LetIndexPage? letIndexChange,
this.animationCurve = Curves.easeOut,
this.animationDuration = const Duration(milliseconds: 600),
this.iconPadding = 12.0,
this.maxWidth,
double? height,
}) : letIndexChange = letIndexChange ?? ((_) => true),
assert(items.isNotEmpty),
assert(0 <= index && index < items.length),
assert(maxWidth == null || 0 <= maxWidth),
height = height ?? (Platform.isAndroid ? 70.0 : 80.0),
hasLabel = items.any((item) => item.label != null),
super(key: key);