BottomNavigation constructor

const BottomNavigation({
  1. Key? key,
  2. required List<BottomNavigationItem> items,
  3. required int index,
  4. ValueChanged<int>? onChanged,
  5. BottomNavigationThemeData? style,
})

Creates a bottom navigation

items must have at least 2 items

index must be in the range of 0 to items.length

Implementation

const BottomNavigation({
  super.key,
  required this.items,
  required this.index,
  this.onChanged,
  this.style,
})  : assert(items.length >= 2),
      assert(index >= 0 && index < items.length);