MultitouchDragStrategy enum

Configuration of multi-finger drag strategy on multi-touch devices.

When dragging with only one finger, there's no difference in behavior between all the settings.

Used by DragGestureRecognizer.multitouchDragStrategy.

Inheritance
Available extensions

Values

latestPointer → const MultitouchDragStrategy

Only the latest active pointer is tracked by the recognizer.

If the tracked pointer is released, the first accepted of the remaining active pointers will continue to be tracked.

This is the behavior typically seen on Android.

averageBoundaryPointers → const MultitouchDragStrategy

All active pointers will be tracked, and the result is computed from the boundary pointers.

The scrolling offset is determined by the maximum deltas of both directions.

If the user is dragging with 3 pointers at the same time, each having [+10, +20, +33] pixels of offset, the recognizer will report a delta of 33 pixels.

If the user is dragging with 5 pointers at the same time, each having [+10, +20, +33, -1, -12] pixels of offset, the recognizer will report a delta of (+33) + (-12) = 21 pixels.

The panning PanGestureRecognizer offset is the average of all pointers.

If the user is dragging with 3 pointers at the same time, each having [+10, +50, -30] pixels of offset in one direction (horizontal or vertical), the recognizer will report a delta of (10 + 50 -30) / 3 = 10 pixels in this direction.

This is the behavior typically seen on iOS.

sumAllPointers → const MultitouchDragStrategy

All active pointers will be tracked together. The scrolling offset is the sum of the offsets of all active pointers.

When a Scrollable drives scrolling by this drag strategy, the scrolling speed will double or triple, depending on how many fingers are dragging at the same time.

If the user is dragging with 3 pointers at the same time, each having [+10, +20, +33] pixels of offset, the recognizer will report a delta of 10 + 20 + 33 = 63 pixels.

If the user is dragging with 5 pointers at the same time, each having [+10, +20, +33, -1, -12] pixels of offset, the recognizer will report a delta of 10 + 20 + 33 - 1 - 12 = 50 pixels.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<MultitouchDragStrategy>
A constant List of the values in this enum, in order of their declaration.