Package io.flutter.embedding.android
Class MotionEventTracker
- java.lang.Object
-
- io.flutter.embedding.android.MotionEventTracker
-
public final class MotionEventTracker extends Object
Tracks the motion events received by the FlutterView.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MotionEventTracker.MotionEventId
Represents a unique identifier corresponding to a motion event.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MotionEventTracker
getInstance()
MotionEvent
pop(MotionEventTracker.MotionEventId eventId)
Returns the MotionEvent corresponding to the eventId while discarding all the motion events that occurred prior to the event represented by the eventId.MotionEventTracker.MotionEventId
track(MotionEvent event)
Tracks the event and returns a unique MotionEventId identifying the event.
-
-
-
Method Detail
-
getInstance
@NonNull public static MotionEventTracker getInstance()
-
track
@NonNull public MotionEventTracker.MotionEventId track(@NonNull MotionEvent event)
Tracks the event and returns a unique MotionEventId identifying the event.
-
pop
@Nullable public MotionEvent pop(@NonNull MotionEventTracker.MotionEventId eventId)
Returns the MotionEvent corresponding to the eventId while discarding all the motion events that occurred prior to the event represented by the eventId. Returns null if this event was popped or discarded.
-
-