AndroidMotionEvent class Null safety
A Dart version of Android's MotionEvent.
This is used by AndroidViewController to describe pointer events that are forwarded to a platform view when Flutter receives an event that it determines is to be handled by that platform view rather than by another Flutter widget.
See also:
- AndroidViewController.sendMotionEvent, which can be used to send an AndroidMotionEvent explicitly.
Constructors
-
AndroidMotionEvent({required int downTime, required int eventTime, required int action, required int pointerCount, required List<
AndroidPointerProperties> pointerProperties, required List<AndroidPointerCoords> pointerCoords, required int metaState, required int buttonState, required double xPrecision, required double yPrecision, required int deviceId, required int edgeFlags, required int source, required int flags, required int motionEventId}) - Creates an AndroidMotionEvent.
Properties
- action → int
-
A value representing the kind of action being performed.
final
-
The state of all buttons that are pressed such as a mouse or stylus button.
final
- deviceId → int
-
See Android's MotionEvent#getDeviceId.
final
- downTime → int
-
The time (in ms) when the user originally pressed down to start a stream of position events,
relative to an arbitrary timeline.
final
- edgeFlags → int
-
A bit field indicating which edges, if any, were touched by this MotionEvent.
final
- eventTime → int
-
The time this event occurred, relative to an arbitrary timeline.
final
- flags → int
-
See Android's MotionEvent#getFlags.
final
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- metaState → int
-
The state of any meta / modifier keys that were in effect when the event was generated.
final
- motionEventId → int
-
Used to identify this MotionEvent uniquely in the Flutter Engine.
final
-
pointerCoords
→ List<
AndroidPointerCoords> -
List of
AndroidPointerCoords
for each pointer that is part of this event.final - pointerCount → int
-
The number of pointers that are part of this event.
This must be equivalent to the length of
pointerProperties
andpointerCoords
.final -
pointerProperties
→ List<
AndroidPointerProperties> -
List of
AndroidPointerProperties
for each pointer that is part of this event.final - runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- source → int
-
The source of this event (e.g a touchpad or stylus).
final
- xPrecision → double
-
The precision of the X coordinates being reported, in physical pixels.
final
- yPrecision → double
-
The precision of the Y coordinates being reported, in physical 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.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited