GestureArena class

Unified gesture disambiguator for GlassModalSheet.

Decides, on every pointer-move event, whether the sheet or an inner ScrollView should own the current gesture. Mutable so it can be reset between pointer sequences without allocating a new instance.

Constructors

GestureArena()

Properties

dragStartSheetPosition ↔ double
Sheet position (fraction of screen height) when the current gesture began.
getter/setter pair
dragStartX ↔ double
X-coordinate of the pointer when the current gesture began.
getter/setter pair
dragStartY ↔ double
Y-coordinate of the pointer when the current gesture began.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
isVerticalGesture ↔ bool
Whether the disambiguated gesture direction is vertical.
getter/setter pair
lastMoveY ↔ double
Pointer y at the previous move, giving the instantaneous drag direction.
getter/setter pair
phase ↔ GesturePhase
Current gesture ownership phase.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
velocityTracker ↔ VelocityTracker
Tracks pointer samples to compute a fling velocity at gesture end.
getter/setter pair

Methods

beginHandleDrag(double y, double sheetPosition) → void
Called when a pointer-down event lands in the sheet's handle zone.
beginPointer(double y, double x, double sheetPosition, PointerDeviceKind kind) → void
Called when a pointer-down event lands in the sheet's content area.
evaluateMove(double y, double x, GlassSheetState currentState, GlassSheetState maxState, double threshold, {required bool canScrollListUp, required bool hasScrollClients, required bool atTopDetent}) → bool
Returns true if gesture should be claimed by sheet (not scroll).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Resets the arena to GesturePhase.idle between pointer sequences.
toString() → String
A string representation of this object.
inherited

Operators

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