ScrollEvent class Null safety

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.

  1. 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
  2. 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.
read-onlyinherited
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.
read-onlyinherited
scrollDelta Offset
The amount to scroll, in logical pixels.
final

Methods

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

Operators

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