Class MotionEventTracker

java.lang.Object
io.flutter.embedding.android.MotionEventTracker

public final class MotionEventTracker extends Object
Tracks the motion events received by the FlutterView.
  • Method Details

    • 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.