longPressAt method
- Offset location, {
- int? pointer,
- int buttons = kPrimaryButton,
- PointerDeviceKind kind = PointerDeviceKind.touch,
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,
int buttons = kPrimaryButton,
PointerDeviceKind kind = PointerDeviceKind.touch,
}) {
return TestAsyncUtils.guard<void>(() async {
final TestGesture gesture = await startGesture(location, pointer: pointer, buttons: buttons, kind: kind);
await pump(kLongPressTimeout + kPressTimeout);
await gesture.up();
});
}