BaseTabBar constructor

const BaseTabBar({
  1. Key? key,
  2. List<BottomNavigationBarItem>? items,
  3. ValueChanged<int>? onTap,
  4. int currentIndex = 0,
  5. double? iconSize,
  6. Color? backgroundColor,
  7. bool showIndicator = true,
  8. Color? activeColor,
  9. Color inactiveColor = CupertinoColors.inactiveGray,
  10. Border? border = const Border(top: BorderSide(color: _kDefaultTabBarBorderColor, width: 0.0, style: BorderStyle.solid)),
  11. double? elevation = 8.0,
  12. BottomNavigationBarType? type,
  13. Color? fixedColor,
  14. Color? selectedItemColor,
  15. Color? unselectedItemColor,
  16. IconThemeData? selectedIconTheme = const IconThemeData(),
  17. IconThemeData? unselectedIconTheme = const IconThemeData(),
  18. double selectedFontSize = 14.0,
  19. double unselectedFontSize = 12.0,
  20. TextStyle? selectedLabelStyle,
  21. TextStyle? unselectedLabelStyle,
  22. bool? showSelectedLabels = true,
  23. bool? showUnselectedLabels,
  24. MouseCursor? mouseCursor,
  25. bool? enableFeedback,
  26. bool enableLiquidGlass = true,
  27. double glassOpacity = 0.85,
  28. double reflectionIntensity = 0.6,
  29. bool adaptiveInteraction = true,
  30. bool hapticFeedback = true,
  31. bool useMaterial3Tabs = true,
  32. bool useNativeCupertinoTabBar = true,
  33. Color? cnTint,
  34. double? cnHeight,
  35. bool cnSplit = false,
  36. int cnRightCount = 1,
  37. bool cnShrinkCentered = true,
  38. double cnSplitSpacing = 8.0,
  39. double? cnBackgroundOpacity,
  40. CNSearchConfig? searchConfig,
  41. 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);