NestedScrollConnection class

A widget that allows the ancestor to consume the new scroll offset occurring in a descendant Scrollable widget before it is consumed by the child.

Used by NestedScrollConnection.

Inheritance

Constructors

NestedScrollConnection({Key? key, NestedScrollListener? onPreScroll, NestedScrollListener? onPostScroll, NestedScrollListener? onFling, NestedScrollListener? onBouncing, NestedScrollPredicate? predicate, NestedScrollPropagation propagation = .directional, Axis axis = .vertical, required Widget child})
const

Properties

axis → Axis
The scroll axis handled by this connection. Events from the other axis pass through to matching ancestors.
final
child → Widget
The subtree whose nested scroll events are handled by this connection.
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onBouncing → NestedScrollListener?
Called for bouncing overflow or repayment of a borrowed bounce offset.
final
onFling → NestedScrollListener?
Called before a ballistic simulation starts with the available velocity.
final
onPostScroll → NestedScrollListener?
Called for movement remaining after the child reaches a scroll boundary.
final
onPreScroll → NestedScrollListener?
Called before the child applies the available scroll movement.
final
predicate → NestedScrollPredicate?
Whether this connection gets priority before normal propagation.
final
propagation → NestedScrollPropagation
The order in which this connection and matching ancestors consume events. Defaults to NestedScrollPropagation.directional.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Static Methods

of(BuildContext context) → NestedScrollConnectionState?
Finds the ancestor NestedScrollConnectionState from the closest instance of this class that encloses the given context.