rejectGesture method

  1. @override
Future<void> rejectGesture({
  1. int? gestureId,
})
override

Informs the platform view that Flutter has won the gesture arena for an active touch sequence.

On Android, this serves as a latency hint. When Flutter wins the gesture arena for a sequence (such as when a parent scroll view begins scrolling), subsequent touch move events request unbuffered dispatch on the native view to eliminate touch lag during Flutter-driven gestures.

On other platforms, or if unbuffered dispatch is not supported, this is a no-op. (On iOS, platform view touch rejection uses DarwinPlatformViewController.rejectGesture.)

The optional gestureId identifies the specific gesture (e.g., its embedderId matching a MotionEvent tracked by MotionEventTracker on Android) that was rejected by the arena.

Implementation

@override
Future<void> rejectGesture({int? gestureId}) {
  return _internals.rejectGesture(viewId: viewId, gestureId: gestureId);
}