CNTabBarNative class

A configurable native iOS 26 tab bar — the full-screen native take-over (UITabBarController via SwiftUI), with search, minimize-on-scroll, a bottom accessory, native lists, and optional Flutter content per tab — all driven from Dart.

A tab that wants the minimize behavior must supply a CNNativeList (CNTab(..., nativeList: ...)) so iOS has a real native scroll view to observe. A tab with no list and no search role hosts your Flutter content (root mode) or a placeholder (modal). iOS 26+ only; a no-op elsewhere.

CNTabBarNative.enable(
  tabs: [
    CNTab(title: 'Feed', sfSymbol: CNSymbol('list.bullet'),
          nativeList: CNNativeList(items: myItems)),
    CNTab(title: 'Profile', sfSymbol: CNSymbol('person')),
    CNTab(title: 'Search', isSearchTab: true),
  ],
  minimizeBehavior: CNTabMinimizeBehavior.onScrollDown,
  bottomAccessory: CNTabAccessory(text: 'Now playing', sfSymbol: CNSymbol('music.note')),
);

Constructors

CNTabBarNative()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Static Properties

isEnabled bool
Whether the tab bar is currently presented.
no setter

Static Methods

activateSearch() Future<void>
Select the search tab.
checkIsEnabled() Future<bool>
Deprecated: use isEnabled (synchronous). Kept for backward compatibility.
deactivateSearch() Future<void>
Clear the current search query.
disable() Future<void>
Dismiss the native tab bar and return to the Flutter app.
enable({required List<CNTab> tabs, int selectedIndex = 0, CNTabMinimizeBehavior minimizeBehavior = CNTabMinimizeBehavior.onScrollDown, CNTabAccessory? bottomAccessory, Color? tintColor, Color? unselectedTintColor, bool? isDark, bool asRoot = false, bool nativeSearchFilter = true, void onTabSelected(int index)?, void onListItemTap(int tabIndex, int itemIndex)?, void onSearchChanged(String query)?, VoidCallback? onAccessoryTap, VoidCallback? onDismissed, void onSearchSubmitted(String query)?, VoidCallback? onSearchCancelled, void onSearchActiveChanged(bool isActive)?}) Future<void>
Present the native tab bar configured from tabs.
setBadgeCounts(List<int?> badgeCounts) Future<void>
Update badge counts per tab (null/0 clears a badge).
setBottomAccessory(CNTabAccessory? accessory) Future<void>
Show, update, or hide the bottom accessory (pass null to hide).
setBrightness({required bool isDark}) Future<void>
Switch between light and dark appearance.
setItems({required int tabIndex, required List<CNListItem> items}) Future<void>
Replace the native list items of the tab at tabIndex.
setMinimizeBehavior(CNTabMinimizeBehavior behavior) Future<void>
Change when the tab bar minimizes.
setSearchText(String text) Future<void>
Set the search field's text programmatically.
setSelectedIndex(int index) Future<void>
Programmatically select the tab at index.
setStyle({Color? tintColor}) Future<void>
Update the selected-tab tint color.