BaseTabBar constructor
const
BaseTabBar({
- Key? key,
- List<
BottomNavigationBarItem> ? items, - ValueChanged<
int> ? onTap, - int currentIndex = 0,
- double? iconSize,
- Color? backgroundColor,
- bool showIndicator = true,
- Color? activeColor,
- Color inactiveColor = CupertinoColors.inactiveGray,
- Border? border = const Border(top: BorderSide(color: _kDefaultTabBarBorderColor, width: 0.0, style: BorderStyle.solid)),
- double? elevation = 8.0,
- BottomNavigationBarType? type,
- Color? fixedColor,
- Color? selectedItemColor,
- Color? unselectedItemColor,
- IconThemeData? selectedIconTheme = const IconThemeData(),
- IconThemeData? unselectedIconTheme = const IconThemeData(),
- double selectedFontSize = 14.0,
- double unselectedFontSize = 12.0,
- TextStyle? selectedLabelStyle,
- TextStyle? unselectedLabelStyle,
- bool? showSelectedLabels = true,
- bool? showUnselectedLabels,
- MouseCursor? mouseCursor,
- bool? enableFeedback,
- bool enableLiquidGlass = true,
- double glassOpacity = 0.85,
- double reflectionIntensity = 0.6,
- bool adaptiveInteraction = true,
- bool hapticFeedback = true,
- bool useMaterial3Tabs = true,
- bool useNativeCupertinoTabBar = true,
- Color? cnTint,
- double? cnHeight,
- bool cnSplit = false,
- int cnRightCount = 1,
- bool cnShrinkCentered = true,
- double cnSplitSpacing = 8.0,
- double? cnBackgroundOpacity,
- CNSearchConfig? searchConfig,
- BaseParam? baseParam,
Implementation
const BaseTabBar({
Key? key,
this.items,
this.onTap,
this.currentIndex = 0,
this.iconSize,
this.backgroundColor,
this.showIndicator = true,
this.activeColor,
this.inactiveColor = CupertinoColors.inactiveGray,
this.border = const Border(
top: BorderSide(
color: _kDefaultTabBarBorderColor,
width: 0.0, // One physical pixel.
style: BorderStyle.solid,
),
),
this.elevation = 8.0,
this.type,
this.fixedColor,
this.selectedItemColor,
this.unselectedItemColor,
this.selectedIconTheme = const IconThemeData(),
this.unselectedIconTheme = const IconThemeData(),
this.selectedFontSize = 14.0,
this.unselectedFontSize = 12.0,
this.selectedLabelStyle,
this.unselectedLabelStyle,
this.showSelectedLabels = true,
this.showUnselectedLabels,
this.mouseCursor,
this.enableFeedback,
// iOS 26 Liquid Glass Dynamic Material properties
this.enableLiquidGlass = true,
this.glassOpacity = 0.85,
this.reflectionIntensity = 0.6,
this.adaptiveInteraction = true,
this.hapticFeedback = true,
this.useMaterial3Tabs = true,
this.useNativeCupertinoTabBar = true, // Enable CNTabBar from cupertino_native
// CNTabBar-specific properties (cupertino_native package)
this.cnTint,
this.cnHeight,
this.cnSplit = false,
this.cnRightCount = 1,
this.cnShrinkCentered = true,
this.cnSplitSpacing = 8.0,
this.cnBackgroundOpacity, // Optional: override background opacity for CNTabBar
// Search functionality
this.searchConfig,
BaseParam? baseParam,
}) : super(key: key, baseParam: baseParam);