sendMotionEvent method Null safety

Future<void> sendMotionEvent(
  1. AndroidMotionEvent event
)

Sends an Android MotionEvent to the view.

The Android MotionEvent object is created with MotionEvent.obtain. See documentation of MotionEvent.obtain for description of the parameters.

See AndroidViewController.dispatchPointerEvent for sending a PointerEvent.

Implementation

Future<void> sendMotionEvent(AndroidMotionEvent event) async {
  await SystemChannels.platform_views.invokeMethod<dynamic>(
    'touch',
    event._asList(viewId),
  );
}