Scrolls a scroll view as the user drags their finger across the screen.

See also:

  • DragScrollActivity, which is the activity the scroll view performs while a drag is underway.
Implements

Constructors

ScrollDragController({@required ScrollActivityDelegate delegate, @required DragStartDetails details, VoidCallback onDragCanceled, double carriedVelocity, double motionStartDistanceThreshold })
Creates an object that scrolls a scroll view as the user drags their finger across the screen. [...]

Properties

carriedVelocity double
Velocity that was present from a previous ScrollActivity when this drag began.
final
delegate ScrollActivityDelegate
The object that will actuate the scroll view as the user drags.
read-only
lastDetails → dynamic
The most recently observed DragStartDetails, DragUpdateDetails, or DragEndDetails object.
read-only
motionStartDistanceThreshold double
Amount of pixels in either direction the drag has to move by to start scroll movement again after each time scrolling came to a stop.
final
onDragCanceled VoidCallback
Called when dispose is called.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

cancel() → void
The input from the pointer is no longer directed towards this receiver. [...]
dispose() → void
Called by the delegate when it is no longer sending events to this object.
@mustCallSuper
end(DragEndDetails details) → void
The pointer is no longer in contact with the screen. [...]
toString() String
Returns a string representation of this object.
update(DragUpdateDetails details) → void
The pointer has moved.
updateDelegate(ScrollActivityDelegate value) → void
Updates the controller's link to the ScrollActivityDelegate. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited

Operators

operator ==(other) bool
The equality operator. [...]
inherited

Constants

momentumRetainStationaryDurationThreshold Duration
Maximum amount of time interval the drag can have consecutive stationary pointer update events before losing the momentum carried from a previous scroll activity.
const Duration(milliseconds: 20)
motionStoppedDurationThreshold Duration
Maximum amount of time interval the drag can have consecutive stationary pointer update events before needing to break the motionStartDistanceThreshold to start motion again.
const Duration(milliseconds: 50)