GlassTabBar.searchable constructor

const GlassTabBar.searchable({
  1. required List<GlassTab> tabs,
  2. required int selectedIndex,
  3. required ValueChanged<int> onTabSelected,
  4. required GlassSearchBarConfig searchConfig,
  5. Key? key,
  6. SearchableBottomBarController? controller,
  7. bool isSearchActive = false,
  8. GlassTabBarExtraButton? extraButton,
  9. GlassTabBarAccessoryPlacement? bottomAccessoryPlacement,
  10. Widget? bottomAccessory,
  11. bool bottomAccessoryEnabled = true,
  12. double bottomAccessorySpacing = 6.0,
  13. double? bottomAccessoryHeight,
  14. double spacing = 8,
  15. double horizontalPadding = 20,
  16. double verticalPadding = 20,
  17. double barHeight = 64,
  18. double searchBarHeight = 50,
  19. double barBorderRadius = _kDefaultBottomBorderRadius,
  20. EdgeInsetsGeometry tabPadding = const EdgeInsets.symmetric(horizontal: 4),
  21. double iconLabelSpacing = 4,
  22. bool enableBlend = true,
  23. bool groupBackdrop = true,
  24. double blendAmount = 10,
  25. LiquidGlassSettings? settings,
  26. bool showIndicator = true,
  27. Color? indicatorColor,
  28. LiquidGlassSettings? indicatorSettings,
  29. double indicatorPinchStrength = 0.4,
  30. Color? selectedIconColor,
  31. Color? unselectedIconColor,
  32. Color? selectedLabelColor,
  33. Color? unselectedLabelColor,
  34. TextStyle? selectedLabelStyle,
  35. TextStyle? unselectedLabelStyle,
  36. double iconSize = 24,
  37. double labelFontSize = 11,
  38. TextStyle? textStyle,
  39. Duration glowDuration = const Duration(milliseconds: 300),
  40. double glowBlurRadius = 32,
  41. double glowSpreadRadius = 8,
  42. double glowOpacity = 0.6,
  43. GlassInteractionBehavior interactionBehavior = GlassInteractionBehavior.full,
  44. double? pressScale,
  45. Color? interactionGlowColor,
  46. double? interactionGlowRadius,
  47. GlassQuality? quality,
  48. GlassQuality? backgroundQuality,
  49. double magnification = 1.15,
  50. double innerBlur = 0.0,
  51. bool platformViewBackdrop = false,
  52. bool passthroughOverPlatformView = false,
  53. MaskingQuality maskingQuality = MaskingQuality.high,
  54. GlobalKey<State<StatefulWidget>>? backgroundKey,
  55. SpringDescription? springDescription,
  56. GlassTabPillAnchor tabPillAnchor = GlassTabPillAnchor.start,
  57. double? tabWidth,
  58. double? indicatorBorderRadius,
  59. EdgeInsetsGeometry indicatorExpansion = const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
  60. VoidCallback? onBarTap,
  61. bool whitenAtBottom = true,
  62. double whitenBottomThreshold = 45.0,
  63. double whitenAtBottomTarget = 1.0,
  64. ScrollController? scrollController,
  65. bool adaptiveBrightness = false,
  66. ValueChanged<Brightness>? onBrightnessChanged,
  67. ValueListenable<Brightness>? brightnessOverride,
})

Creates a bottom bar with a morphing search pill.

This constructor replaces the legacy GlassSearchableBottomBar. All parameters are identical to that widget. Migrate by replacing GlassSearchableBottomBar( → GlassTabBar.searchable(.

Implementation

const GlassTabBar.searchable({
  required List<GlassTab> tabs,
  required int selectedIndex,
  required ValueChanged<int> onTabSelected,
  required GlassSearchBarConfig searchConfig,
  Key? key,
  SearchableBottomBarController? controller,
  bool isSearchActive = false,
  GlassTabBarExtraButton? extraButton,
  GlassTabBarAccessoryPlacement? bottomAccessoryPlacement,
  Widget? bottomAccessory,
  bool bottomAccessoryEnabled = true,
  double bottomAccessorySpacing = 6.0,
  double? bottomAccessoryHeight,
  double spacing = 8,
  double horizontalPadding = 20,
  double verticalPadding = 20,
  double barHeight = 64,
  double searchBarHeight = 50,
  double barBorderRadius = _kDefaultBottomBorderRadius,
  EdgeInsetsGeometry tabPadding = const EdgeInsets.symmetric(horizontal: 4),
  double iconLabelSpacing = 4,
  bool enableBlend = true,
  bool groupBackdrop = true,
  double blendAmount = 10,
  LiquidGlassSettings? settings,
  bool showIndicator = true,
  Color? indicatorColor,
  LiquidGlassSettings? indicatorSettings,
  double indicatorPinchStrength = 0.4,
  Color? selectedIconColor,
  Color? unselectedIconColor,
  Color? selectedLabelColor,
  Color? unselectedLabelColor,
  TextStyle? selectedLabelStyle,
  TextStyle? unselectedLabelStyle,
  double iconSize = 24,
  double labelFontSize = 11,
  TextStyle? textStyle,
  Duration glowDuration = const Duration(milliseconds: 300),
  double glowBlurRadius = 32,
  double glowSpreadRadius = 8,
  double glowOpacity = 0.6,
  GlassInteractionBehavior interactionBehavior =
      GlassInteractionBehavior.full,
  double? pressScale,
  Color? interactionGlowColor,
  double? interactionGlowRadius,
  GlassQuality? quality,
  GlassQuality? backgroundQuality,
  double magnification = 1.15,
  double innerBlur = 0.0,
  bool platformViewBackdrop = false,
  bool passthroughOverPlatformView = false,
  MaskingQuality maskingQuality = MaskingQuality.high,
  GlobalKey? backgroundKey,
  SpringDescription? springDescription,
  GlassTabPillAnchor tabPillAnchor = GlassTabPillAnchor.start,
  double? tabWidth,
  double? indicatorBorderRadius,
  EdgeInsetsGeometry indicatorExpansion =
      const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
  VoidCallback? onBarTap,
  bool whitenAtBottom = true,
  double whitenBottomThreshold = 45.0,
  double whitenAtBottomTarget = 1.0,
  ScrollController? scrollController,
  bool adaptiveBrightness = false,
  ValueChanged<Brightness>? onBrightnessChanged,
  ValueListenable<Brightness>? brightnessOverride,
}) : this._(
        key: key,
        placement: _GlassTabBarPlacement.searchable,
        tabs: tabs,
        selectedIndex: selectedIndex,
        onTabSelected: onTabSelected,
        searchConfig: searchConfig,
        controller: controller,
        isSearchActive: isSearchActive,
        extraButton: extraButton,
        bottomAccessoryPlacement: bottomAccessoryPlacement,
        bottomAccessory: bottomAccessory,
        bottomAccessoryEnabled: bottomAccessoryEnabled,
        bottomAccessorySpacing: bottomAccessorySpacing,
        bottomAccessoryHeight: bottomAccessoryHeight,
        spacing: spacing,
        horizontalPadding: horizontalPadding,
        verticalPadding: verticalPadding,
        barHeight: barHeight,
        searchBarHeight: searchBarHeight,
        barBorderRadius: barBorderRadius,
        tabPadding: tabPadding,
        iconLabelSpacing: iconLabelSpacing,
        enableBlend: enableBlend,
        groupBackdrop: groupBackdrop,
        blendAmount: blendAmount,
        settings: settings,
        showIndicator: showIndicator,
        indicatorColor: indicatorColor,
        indicatorSettings: indicatorSettings,
        indicatorPinchStrength: indicatorPinchStrength,
        selectedIconColor: selectedIconColor,
        unselectedIconColor: unselectedIconColor,
        selectedLabelColor: selectedLabelColor,
        unselectedLabelColor: unselectedLabelColor,
        selectedLabelStyle: selectedLabelStyle,
        unselectedLabelStyle: unselectedLabelStyle,
        iconSize: iconSize,
        labelFontSize: labelFontSize,
        textStyle: textStyle,
        glowDuration: glowDuration,
        glowBlurRadius: glowBlurRadius,
        glowSpreadRadius: glowSpreadRadius,
        glowOpacity: glowOpacity,
        interactionBehavior: interactionBehavior,
        pressScale: pressScale,
        interactionGlowColor: interactionGlowColor,
        interactionGlowRadius: interactionGlowRadius,
        quality: quality,
        backgroundQuality: backgroundQuality,
        magnification: magnification,
        innerBlur: innerBlur,
        platformViewBackdrop: platformViewBackdrop,
        passthroughOverPlatformView: passthroughOverPlatformView,
        maskingQuality: maskingQuality,
        backgroundKey: backgroundKey,
        springDescription: springDescription,
        tabPillAnchor: tabPillAnchor,
        tabWidth: tabWidth,
        indicatorBorderRadius: indicatorBorderRadius,
        indicatorExpansion: indicatorExpansion,
        onBarTap: onBarTap,
        whitenAtBottom: whitenAtBottom,
        whitenBottomThreshold: whitenBottomThreshold,
        whitenAtBottomTarget: whitenAtBottomTarget,
        scrollController: scrollController,
        adaptiveBrightness: adaptiveBrightness,
        onBrightnessChanged: onBrightnessChanged,
        brightnessOverride: brightnessOverride,
      );