AdaptiveBottomNavigationBar class

Configuration for an adaptive bottom navigation bar

This class holds the configuration for the bottom navigation bar in AdaptiveScaffold. The actual rendering is platform-specific:

  • iOS 26+ with useNativeBottomBar: Native UITabBar with Liquid Glass effects
  • iOS 26+ without useNativeBottomBar: CupertinoTabBar (custom or auto-generated)
  • iOS <26: CupertinoTabBar (custom or auto-generated)
  • Android: NavigationBar (custom or auto-generated)

You can provide custom bottom navigation bars using cupertinoTabBar or bottomNavigationBar:

  • If cupertinoTabBar is provided: Uses custom CupertinoTabBar on iOS (when useNativeBottomBar is false or iOS <26)
  • If bottomNavigationBar is provided: Uses custom NavigationBar/BottomNavigationBar on Android
  • Otherwise: Builds bottom navigation bar from items

Constructors

AdaptiveBottomNavigationBar({List<AdaptiveNavigationDestination>? items, int? selectedIndex, ValueChanged<int>? onTap, bool useNativeBottomBar = true, CupertinoTabBar? cupertinoTabBar, Widget? bottomNavigationBar, Color? selectedItemColor, Color? unselectedItemColor})
Creates an adaptive bottom navigation bar configuration
const

Properties

bottomNavigationBar → Widget?
Custom NavigationBar or BottomNavigationBar for Android
final
cupertinoTabBar → CupertinoTabBar?
Custom CupertinoTabBar for iOS
final
hashCode → int
The hash code for this object.
no setterinherited
items → List<AdaptiveNavigationDestination>?
Navigation items for bottom navigation bar These will be used to build the platform-specific navigation items if custom bars are not provided.
final
onTap → ValueChanged<int>?
Called when a navigation item is tapped If null, navigation will not be interactive
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectedIndex → int?
Currently selected item index If null, no item will be selected
final
selectedItemColor → Color?
Color for the selected navigation item
final
unselectedItemColor → Color?
Color for unselected navigation items
final
useNativeBottomBar → bool
Use native iOS 26 bottom bar (iOS 26+ only)
final

Methods

copyWith({List<AdaptiveNavigationDestination>? items, int? selectedIndex, ValueChanged<int>? onTap, bool? useNativeBottomBar, CupertinoTabBar? cupertinoTabBar, Widget? bottomNavigationBar, Color? selectedItemColor, Color? unselectedItemColor}) → AdaptiveBottomNavigationBar
Creates a copy of this bottom navigation bar with the given fields replaced
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited