MoveHandler class

A handler for swipe gestures. The timer is used to distinguish between normal move events and drag (=wait until the timer expires) and drop events.

Inheritance

Constructors

MoveHandler({required int longPressDuration, required MapModel mapModel, double swipeAbsorption = 0.9})

Properties

hashCode → int
The hash code for this object.
no setterinherited
longPressDuration → int
finalinherited
mapModel → MapModel
finalinherited
maxDistance → int
The maximum distance in pixels which the curser is allowed to move between tapDown and tapUp.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size ↔ Size
getter/setter pairinherited
startOffset ↔ Offset?
getter/setter pairinherited
startPosition ↔ MapPosition?
getter/setter pairinherited
swipeAbsorption → double
The absorption factor of a swipe. The lower the factor the faster swiping stops.
final
velocityCalculator → SimpleVelocityCalculator
final

Methods

activeTimer() → bool
inherited
cancelTimer() → void
override
createEvent(Offset offset) → TapEvent
inherited
hasMoved(Offset offset) → bool
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onPointerCancel(int pointerId, Offset offset, Map<int, Offset> pointers) → void
inherited
onPointerDown(MapPosition position, int pointerId, Offset offset, Map<int, Offset> pointers) → void
override
onPointerMove(int pointerId, Offset offset, Map<int, Offset> pointers) → void
override
onPointerUp(int pointerId, Offset offset, Map<int, Offset> pointers) → void
override
onTimeout() → void
override
setSize(Size size) → void
inherited
startTimer() → void
inherited
toString() → String
A string representation of this object.
inherited

Operators

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