StretchingOverscrollIndicatorModifier class

A Material Design visual indication that a scroll view has overscrolled.

A StretchingOverscrollIndicator listens for ScrollNotifications in order to stretch the content of the Scrollable. These notifications are typically generated by a ScrollView, such as a ListView or a GridView.

When triggered, the StretchingOverscrollIndicator generates an OverscrollIndicatorNotification before showing an overscroll indication. To prevent the indicator from showing the indication, call OverscrollIndicatorNotification.disallowIndicator on the notification.

Created by ScrollBehavior.buildOverscrollIndicator on platforms (e.g., Android) that commonly use this type of overscroll indication when ScrollBehavior.androidOverscrollIndicator is AndroidOverscrollIndicator.stretch. Otherwise, the default GlowingOverscrollIndicator is applied. ScrollBehavior.androidOverscrollIndicator is deprecated, use ThemeData.useMaterial3, or override ScrollBehavior.buildOverscrollIndicator to choose the desired indicator.

See also:

Inheritance
Available extensions

Constructors

StretchingOverscrollIndicatorModifier({Key? key, Widget? child, Key? modifierKey, required AxisDirection axisDirection, Clip clipBehavior = Clip.hardEdge, ScrollNotificationPredicate notificationPredicate = defaultScrollNotificationPredicate})
Creates a visual indication that a scroll view has overscrolled by applying a stretch transformation to the content.
const

Properties

axisDirection AxisDirection
The direction of positive scroll offsets in the Scrollable whose overscrolls are to be visualized.
final
clipBehavior Clip
The content will be clipped (or not) according to this option.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
modifierKey Key?
The actual key of the widget, which Modifier wrapped
finalinherited
notificationPredicate ScrollNotificationPredicate
A check that specifies whether a ScrollNotification should be handled by this widget.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
inherited
buildWithChild(BuildContext context, Widget? child) Widget
A build method that receives an extra child parameter.
override
createElement() SingleChildStatelessElement
Create a SingleChildStatelessElement
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}) 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