CurvedNavigationBar constructor

CurvedNavigationBar({
  1. Key? key,
  2. required List<CurvedNavigationBarItem> items,
  3. int index = 0,
  4. Color color = Colors.white,
  5. Color? buttonBackgroundColor,
  6. Color backgroundColor = Colors.blueAccent,
  7. ValueChanged<int>? onTap,
  8. _LetIndexPage? letIndexChange,
  9. Curve animationCurve = Curves.easeOut,
  10. Duration animationDuration = const Duration(milliseconds: 600),
  11. double iconPadding = 12.0,
  12. 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,
  double? height,
})  : assert(items.isNotEmpty),
      assert(0 <= index && index < items.length),
      letIndexChange = letIndexChange ?? ((_) => true),
      height = height ?? (Platform.isAndroid ? 70.0 : 80.0),
      hasLabel = items.any((item) => item.label != null),
      super(key: key);