longPressAt method

Future<void> longPressAt (Offset location, { int pointer })

Dispatch a pointer down / pointer up sequence at the given location with a delay of kLongPressTimeout + kPressTimeout between the two events.

Implementation

Future<void> longPressAt(Offset location, { int pointer }) {
  return TestAsyncUtils.guard<void>(() async {
    final TestGesture gesture = await startGesture(location, pointer: pointer);
    await pump(kLongPressTimeout + kPressTimeout);
    await gesture.up();
  });
}