TabIndicator class
Internal widget that manages the draggable indicator with physics.
Extracted from GlassBottomBar to keep the public widget focused on layout and configuration, while this widget owns all gesture, animation, and rendering logic for the tab indicator pill.
Responsibilities:
- Horizontal drag gesture handling (GestureDetector + Listener)
- Spring-based alignment animation (VelocitySpringBuilder)
- Jelly deformation during drag (SpringBuilder + thickness)
- Dual rendering modes: MaskingQuality.off and MaskingQuality.high
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- TabIndicator
Constructors
-
TabIndicator({required Widget childUnselected, required Widget selectedTabBuilder(BuildContext, double, Alignment), required int tabIndex, required int tabCount, required ValueChanged<
int> onTabChanged, required bool visible, required Color? indicatorColor, required GlassQuality quality, required double barHeight, required double barBorderRadius, required EdgeInsetsGeometry tabPadding, required double magnification, required double innerBlur, required MaskingQuality maskingQuality, LiquidGlassSettings? indicatorSettings, GlobalKey<State< ? backgroundKey, double indicatorExpansion = 14, Color? interactionGlowColor, double interactionGlowRadius = 1.5, double interactionGlowBlurRadius = 0, double interactionGlowSpreadRadius = 0, double interactionGlowOpacity = 1, double interactionScale = 1.0, Key? key})StatefulWidget> > -
const
Properties
-
backgroundKey
→ GlobalKey<
State< ?StatefulWidget> > -
final
- barBorderRadius → double
-
final
- barHeight → double
-
final
- childUnselected → Widget
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- indicatorColor → Color?
-
final
- indicatorExpansion → double
-
How far the jelly indicator's leading and trailing edges expand
past the tab boundary as the indicator translates. Higher values
give a more dramatic "puff" stretch; lower values produce a
tighter, more iOS-native feel. Defaults to
14to match the pre-existing visual.final - indicatorSettings → LiquidGlassSettings?
-
final
- innerBlur → double
-
final
- interactionGlowBlurRadius → double
-
final
- interactionGlowColor → Color?
-
final
- interactionGlowOpacity → double
-
final
- interactionGlowRadius → double
-
final
- interactionGlowSpreadRadius → double
-
final
- interactionScale → double
-
The scale factor applied by
LiquidStretchon press.final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- magnification → double
-
final
- maskingQuality → MaskingQuality
-
final
-
onTabChanged
→ ValueChanged<
int> -
final
- quality → GlassQuality
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedTabBuilder → Widget Function(BuildContext, double, Alignment)
-
final
- tabCount → int
-
final
- tabIndex → int
-
final
- tabPadding → EdgeInsetsGeometry
-
final
- visible → bool
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< TabIndicator> -
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