Unverified Commit c905a09b authored by Peixin Li's avatar Peixin Li Committed by GitHub

Add documentation for drag/fling offset in WidgetController. (#118288)

* Documentation for drag/fling offset

* Fix typo

* Fix typo 2

* Fix the docs_test

* Fix the grammar
parent db8d1a44
......@@ -562,6 +562,16 @@ abstract class WidgetController {
///
/// {@macro flutter.flutter_test.WidgetController.tap.warnIfMissed}
///
/// {@template flutter.flutter_test.WidgetController.fling.offset}
/// The `offset` represents a distance the pointer moves in the global
/// coordinate system of the screen.
///
/// Positive [Offset.dy] values mean the pointer moves downward. Negative
/// [Offset.dy] values mean the pointer moves upwards. Accordingly, positive
/// [Offset.dx] values mean the pointer moves towards the right. Negative
/// [Offset.dx] values mean the pointer moves towards left.
/// {@endtemplate}
///
/// {@template flutter.flutter_test.WidgetController.fling}
/// This can pump frames.
///
......@@ -817,6 +827,8 @@ abstract class WidgetController {
/// The operation happens at once. If you want the drag to last for a period
/// of time, consider using [timedDrag].
///
/// {@macro flutter.flutter_test.WidgetController.fling.offset}
///
/// {@template flutter.flutter_test.WidgetController.drag}
/// By default, if the x or y component of offset is greater than
/// [kDragSlopDefault], the gesture is broken up into two separate moves
......@@ -953,6 +965,8 @@ abstract class WidgetController {
///
/// {@macro flutter.flutter_test.WidgetController.tap.warnIfMissed}
///
/// {@macro flutter.flutter_test.WidgetController.fling.offset}
///
/// This is the timed version of [drag]. This may or may not result in a
/// [fling] or ballistic animation, depending on the speed from
/// `offset/duration`.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment