dragFrom method

Future<void> dragFrom (Offset startLocation, Offset offset, { int pointer })

Attempts a drag gesture consisting of a pointer down, a move by the given offset, and a pointer up.

If you want the drag to end with a speed so that the gesture recognition system identifies the gesture as a fling, consider using flingFrom instead.

Implementation

Future<void> dragFrom(Offset startLocation, Offset offset, {int pointer}) {
  return TestAsyncUtils.guard<void>(() async {
    final TestGesture gesture = await startGesture(startLocation, pointer: pointer);
    assert(gesture != null);
    await gesture.moveBy(offset);
    await gesture.up();
  });
}