Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 776a15c

Browse files
authored
Documentation update to advertize timedDrag (#106489)
1 parent a74c481 commit 776a15c

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

packages/flutter_test/lib/src/controller.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,12 @@ abstract class WidgetController {
781781
///
782782
/// You can use [createGesture] if your gesture doesn't begin with an initial
783783
/// down gesture.
784+
///
785+
/// See also:
786+
/// * [WidgetController.drag], a method to simulate a drag.
787+
/// * [WidgetController.timedDrag], a method to simulate the drag of a given widget in a given duration.
788+
/// It sends move events at a given frequency and it is useful when there are listeners involved.
789+
/// * [WidgetController.fling], a method to simulate a fling.
784790
Future<TestGesture> startGesture(
785791
Offset downLocation, {
786792
int? pointer,

packages/flutter_test/lib/src/test_pointer.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,12 @@ class TestGesture {
463463
///
464464
/// If the pointer is down, then a move event is dispatched. If the pointer is
465465
/// up, then a hover event is dispatched.
466+
///
467+
/// See also:
468+
/// * [WidgetController.drag], a method to simulate a drag.
469+
/// * [WidgetController.timedDrag], a method to simulate the drag of a given widget in a given duration.
470+
/// It sends move events at a given frequency and it is useful when there are listeners involved.
471+
/// * [WidgetController.fling], a method to simulate a fling.
466472
Future<void> moveBy(Offset offset, { Duration timeStamp = Duration.zero }) {
467473
assert(_pointer.location != null);
468474
return moveTo(_pointer.location! + offset, timeStamp: timeStamp);
@@ -472,6 +478,12 @@ class TestGesture {
472478
///
473479
/// If the pointer is down, then a move event is dispatched. If the pointer is
474480
/// up, then a hover event is dispatched.
481+
///
482+
/// See also:
483+
/// * [WidgetController.drag], a method to simulate a drag.
484+
/// * [WidgetController.timedDrag], a method to simulate the drag of a given widget in a given duration.
485+
/// It sends move events at a given frequency and it is useful when there are listeners involved.
486+
/// * [WidgetController.fling], a method to simulate a fling.
475487
Future<void> moveTo(Offset location, { Duration timeStamp = Duration.zero }) {
476488
return TestAsyncUtils.guard<void>(() {
477489
if (_pointer._isDown) {

0 commit comments

Comments
 (0)