downWithCustomEvent method

Future<void> downWithCustomEvent(
  1. Offset downLocation,
  2. PointerDownEvent event
)

Dispatch a pointer down event at the given downLocation, caching the hit test result with a custom down event.

Implementation

Future<void> downWithCustomEvent(Offset downLocation, PointerDownEvent event) async {
  assert(_pointer.kind != PointerDeviceKind.trackpad, 'Trackpads are expected to send panZoomStart events, not down events');
  _pointer.setDownInfo(event, downLocation);
  return TestAsyncUtils.guard<void>(() async {
    return _dispatcher(event);
  });
}