GlassTabBar.searchable constructor
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<
State< ? backgroundKey,StatefulWidget> > - 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,
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,
);