PointerEventResampler class Null safety
Class for pointer event resampling.
An instance of this class can be used to resample one sequence of pointer events. Multiple instances are expected to be used for multi-touch support. The sampling frequency and the sampling offset is determined by the caller.
This can be used to get smooth touch event processing at the cost of adding some latency. Devices with low frequency sensors or when the frequency is not a multiple of the display frequency (e.g., 120Hz input and 90Hz display) benefit from this.
Resampling is currently limited to event position and delta. All pointer event types except PointerAddedEvent will be resampled. PointerHoverEvent and PointerMoveEvent will only be generated when the position has changed.
- hashCode → int
The hash code for this object. [...]
- hasPendingEvents → bool
trueif a call to sample can dispatch more events.read-only
- isDown → bool
trueif pointer is currently down.read-only
- isTracked → bool
trueif pointer is currently tracked.read-only
- runtimeType → Type
A representation of the runtime type of the object.
PointerEvent event) → void
Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
Duration sampleTime, HandleEventCallback callback) → void
Dispatch resampled pointer events for the specified
HandleEventCallback callback) → void
- Stop resampling. [...]
) → String
Returns a string representation of this object.