LGIndicator class
A shared component that renders the interactive "Jelly" indicator
used in LGTabBar, LGSegmentedControl, and LGBottomBar.
Handles:
- Jelly physics (squash and stretch)
- Thickness-based crossfade between background and glass
- Positioning and expansion
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- LGIndicator
Constructors
- LGIndicator({Key? key, required double velocity, required int itemCount, required Alignment alignment, required double thickness, required LGQuality quality, required Color indicatorColor, required bool isBackgroundIndicator, required double borderRadius, LiquidGlassSettings? glassSettings, EdgeInsetsGeometry padding = EdgeInsets.zero, double expansion = 8.0, bool useSuperellipse = true})
-
const
Properties
- alignment → Alignment
-
Current alignment of the indicator.
final
- borderRadius → double
-
Border radius of the indicator.
final
- expansion → double
-
How much to expand the indicator during drag (default 8.0).
final
- glassSettings → LiquidGlassSettings?
-
Optional glass settings override.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- indicatorColor → Color
-
Base color for the indicator (used for background mode).
final
- isBackgroundIndicator → bool
-
Whether this is the background (non-glass) pass.
final
- itemCount → int
-
Number of items (tabs/segments).
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- padding → EdgeInsetsGeometry
-
Padding to apply around the indicator (e.g., for LGBottomBar).
final
- quality → LGQuality
-
Rendering quality (standard/premium).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- thickness → double
-
Animation value (0.0 to 1.0) indicating drag state.
0 = resting, >0 = dragging/animating.
final
- useSuperellipse → bool
-
Whether to use LiquidRoundedSuperellipse (Apple style) or standard RoundedRectangle.
final
- velocity → double
-
Current velocity of the drag gesture.
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
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