NavigationBar constructor

const NavigationBar({
  1. Key? key,
  2. Duration? animationDuration,
  3. int selectedIndex = 0,
  4. required List<NavigationDestination> destinations,
  5. ValueChanged<int>? onDestinationSelected,
  6. Color? backgroundColor,
  7. double? elevation,
  8. Color? shadowColor,
  9. Color? surfaceTintColor,
  10. Color? indicatorColor,
  11. ShapeBorder? indicatorShape,
  12. double? height,
  13. NavigationDestinationLabelBehavior? labelBehavior,
})

Implementation

const NavigationBar({
  super.key,
  this.animationDuration,
  this.selectedIndex = 0,
  required this.destinations,
  this.onDestinationSelected,
  this.backgroundColor,
  this.elevation,
  this.shadowColor,
  this.surfaceTintColor,
  this.indicatorColor,
  this.indicatorShape,
  this.height,
  this.labelBehavior,
})  : assert(destinations.length >= 2),
      assert(0 <= selectedIndex && selectedIndex < destinations.length);