ScrollEvent class
The pointer issued a scroll event.
Scrolling the scroll wheel on a mouse is an example of an event that
would create a XGestureDetector.ScrollEvent
See also: PointerScrollEvent.
- To use this event for scalling, we can use localPos as the focal point and scrollDelta.distance to get the scale value, scrollDelta.direction to get the direction
- To use this event for scroll, just use scrollDelta (e.g: currentPosition += scrollDelta)
- Annotations
Constructors
- ScrollEvent(int pointer, Offset localPos, Offset position, Offset scrollDelta)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- localPos → Offset
-
The position transformed into the event receiver's local coordinate
system according to
transform
.final - pointer → int
-
the pointer id
final
- position → Offset
-
Coordinate of the position of the pointer, in logical pixels in the global
coordinate space.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrollDelta → Offset
-
The amount to scroll, in logical pixels.
final
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