NavigationBar constructor Null safety
Creates a Material 3 Navigation Bar component.
The value of destinations must be a list of two or more NavigationDestination values.
Implementation
// TODO(goderbauer): This class cannot be const constructed, https://github.com/dart-lang/linter/issues/3366.
// ignore: prefer_const_constructors_in_immutables
NavigationBar({
super.key,
this.animationDuration,
this.selectedIndex = 0,
required this.destinations,
this.onDestinationSelected,
this.backgroundColor,
this.surfaceTintColor,
this.elevation,
this.height,
this.labelBehavior,
}) : assert(destinations != null && destinations.length >= 2),
assert(0 <= selectedIndex && selectedIndex < destinations.length);