AbstractRefreshIndicator class
A lightweight pull-to-refresh indicator that displays a caller-provided icon instead of the Material progress arc used by RefreshIndicator.
The icon rotates proportionally to the drag distance while the user pulls and spins continuously while onRefresh is in flight. No external dependencies are required — the widget listens to scroll notifications from its child and renders the icon in an overlay above it.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- AbstractRefreshIndicator
Constructors
Properties
- child → Widget
-
The scrollable below the indicator. Must use a scroll physics that
reports overscroll (e.g. AlwaysScrollableScrollPhysics or
BouncingScrollPhysics) so the pull gesture is detectable when there
are few items.
final
- dragDamping → double
-
Damping applied to overscroll deltas so the icon trails the finger.
Values closer to 1 follow the finger 1:1; smaller values feel heavier.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → Widget
-
The icon to display. Typically an Icon or
SvgPicturesized around 24-32 logical pixels.final - key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onRefresh
→ Future<
void> Function() -
Called when the user pulls past triggerDistance and releases. The
returned future controls how long the spinning state is shown.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spinDuration → Duration
-
Duration of one full rotation while onRefresh is running.
final
- triggerDistance → double
-
Pixels of overscroll required to trigger a refresh.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< AbstractRefreshIndicator> -
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