GlassSearchableBottomBar class

A glass bottom navigation bar with a morphing search pill.

Visually identical to GlassBottomBar but adds a search pill that shares the same AdaptiveLiquidGlassLayer as the tab pill. This means the two pills correctly liquid-merge at their edges — the same organic blending that makes the tab-bar + extra-button coupling feel native to iOS 26.

When isSearchActive is false the widget looks exactly like GlassBottomBar with a compact search icon pill at the right edge.

When isSearchActive is true:

All parameters mirror GlassBottomBar exactly, with the additions of isSearchActive and searchConfig.

Inheritance

Constructors

GlassSearchableBottomBar({required List<GlassBottomBarTab> tabs, required int selectedIndex, required ValueChanged<int> onTabSelected, required GlassSearchBarConfig searchConfig, Key? key, SearchableBottomBarController? controller, bool isSearchActive = false, GlassBottomBarExtraButton? extraButton, double spacing = 8, double horizontalPadding = 20, double verticalPadding = 20, double barHeight = 64, double searchBarHeight = 50, double barBorderRadius = _kDefaultBorderRadius, EdgeInsetsGeometry tabPadding = const EdgeInsets.symmetric(horizontal: 4), double iconLabelSpacing = 4, double blendAmount = 10, LiquidGlassSettings? glassSettings, bool showIndicator = true, Color? indicatorColor, LiquidGlassSettings? indicatorSettings, Color selectedIconColor = Colors.white, Color unselectedIconColor = Colors.white, double iconSize = 24, double labelFontSize = 11, TextStyle? textStyle, Duration glowDuration = const Duration(milliseconds: 300), double glowBlurRadius = 32, double glowSpreadRadius = 8, double glowOpacity = 0.6, Color? interactionGlowColor, double interactionGlowRadius = 1.5, GlassQuality? quality, double magnification = 1.0, double innerBlur = 0.0, MaskingQuality maskingQuality = MaskingQuality.high, GlobalKey<State<StatefulWidget>>? backgroundKey, SpringDescription? springDescription, GlassTabPillAnchor tabPillAnchor = GlassTabPillAnchor.start, GlassInteractionBehavior interactionBehavior = GlassInteractionBehavior.full, double pressScale = 1.04})
Creates a glass bottom bar with a morphing search pill.
const

Properties

backgroundKey GlobalKey<State<StatefulWidget>>?
Background key for Skia/web refraction. Optional.
final
barBorderRadius double
Corner radius of both pills. Defaults to 32 (full pill shape).
final
barHeight double
Height of the tab pill and search pill. Defaults to 64.
final
blendAmount double
Liquid-glass blend amount for the shared AdaptiveLiquidGlassLayer.
final
controller SearchableBottomBarController?
Optional controller to manage the search bar state machine externally.
final
extraButton GlassBottomBarExtraButton?
Optional extra action button shown between the tab pill and the search pill.
final
glassSettings LiquidGlassSettings?
Custom glass settings. Falls back to identical defaults as GlassBottomBar.
final
glowBlurRadius double
Blur radius of the glow. Defaults to 32.
final
glowDuration Duration
Duration of the tab glow animation. Defaults to 300 ms.
final
glowOpacity double
Opacity of the glow at full intensity. Defaults to 0.6.
final
glowSpreadRadius double
Spread radius of the glow. Defaults to 8.
final
hashCode int
The hash code for this object.
no setterinherited
horizontalPadding double
Horizontal padding around the full bar content. Defaults to 20.
final
iconLabelSpacing double
Vertical spacing between icon and label. Defaults to 4.
final
iconSize double
Size of tab icons. Defaults to 24.
final
indicatorColor Color?
Base color of the glass indicator. Falls back to theme or a translucent white.
final
indicatorSettings LiquidGlassSettings?
Custom glass settings for the indicator element.
final
innerBlur double
Blur amount inside the selected indicator. Defaults to 0.0.
final
interactionBehavior GlassInteractionBehavior
Controls which physical interaction effects are active when the user presses the bar.
final
interactionGlowColor Color?
The color of the directional glow effect when interacting with the bar.
final
interactionGlowRadius double
The radius spread of the directional glow effect when interacting with the bar.
final
isSearchActive bool
Whether the search bar is currently expanded.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelFontSize double
Font size for tab labels.
final
magnification double
Magnification factor for the selected indicator lens effect. Defaults to 1.0.
final
maskingQuality MaskingQuality
Rendering quality for the liquid masking effect. Defaults to MaskingQuality.high.
final
onTabSelected ValueChanged<int>
Callback fired when a tab is selected or the draggable indicator is released.
final
pressScale double
Peak scale factor applied to the bar at maximum press depth.
final
quality GlassQuality?
Rendering quality. Inherits from parent or defaults to GlassQuality.premium.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchBarHeight double
Height of the pills when search is active. Defaults to 50.0.
final
searchConfig GlassSearchBarConfig
Configuration for the morphing search bar behaviour.
final
selectedIconColor Color
Icon color when a tab is selected. Defaults to white.
final
selectedIndex int
Index of the currently selected tab (0-based).
final
showIndicator bool
Whether to show the draggable indicator. Defaults to true.
final
spacing double
Spacing between adjacent pills. Defaults to 8.
final
springDescription SpringDescription?
Custom spring physics for the pill morph animation.
final
tabPadding EdgeInsetsGeometry
Internal padding within the tab pill. Defaults to 4 px horizontal.
final
tabPillAnchor GlassTabPillAnchor
How the tab pill is anchored horizontally during the morph animation.
final
tabs List<GlassBottomBarTab>
List of tabs. At least one tab is required.
final
textStyle TextStyle?
Text style for tab labels. Uses 11 pt w600/w500 when null.
final
unselectedIconColor Color
Icon color when a tab is unselected. Defaults to white.
final
verticalPadding double
Vertical padding (top + bottom) around the bar content. Defaults to 20.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<GlassSearchableBottomBar>
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited