StickyNavigationIndicator class

A sticky navigation indicator.

This indicator animates between navigation items with a "sticky" effect, stretching and contracting smoothly as the selection changes.

Behavior

At rest (not transitioning): The indicator is displayed in the center of the selected item with equal padding on both ends.

During transition:

  • The old item's indicator shrinks towards the new item (padding increases on the side facing the new item)
  • The new item's indicator grows from the direction of the old item (padding decreases on the side facing the old item)

This creates a "sticky" stretching effect as if the indicator is being pulled from one item to another.

Inheritance

Constructors

Creates a sticky navigation indicator.
const

Properties

color → Color?
The highlight color
finalinherited
curve → Curve?
The curve used on the animation, if any
finalinherited
duration → Duration?
The duration used on the animation, if any
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
indicatorSize → double
The size of the indicator.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leftPadding → double
The padding used on both vertical sides of the indicator when the current display mode is not top.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
topPadding → double
The padding used on both horizontal sides of the indicator when the current display mode is top.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → NavigationIndicatorState<StickyNavigationIndicator>
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