Skip to content

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

Merged
auto-submit[bot] merged 5 commits into
flutter:masterfrom
peixinli:widgetetester
Jan 12, 2023
Merged

auto-submit[bot] merged 5 commits into
flutter:masterfrom
peixinli:widgetetester

Conversation

@peixinli

Copy link
Copy Markdown
Contributor

Add documentation for offset in WdigetController to explain the direction on positive/negative coordinate values

Fixes #56150

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard Bot added a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels. labels Jan 11, 2023
@peixinli
peixinli requested a review from goderbauer January 11, 2023 01:21
@Piinks Piinks added d: api docs Issues with https://api.flutter.dev/ documentation labels Jan 11, 2023

@Piinks Piinks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very helpful! I always forget which way is which. Just a few nits for grammar. :)

/// {@macro flutter.flutter_test.WidgetController.tap.warnIfMissed}
///
/// {@template flutter.flutter_test.WidgetController.fling.offset}
/// The `offset` represents a distance the pointer moves in global coordinate

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// The `offset` represents a distance the pointer moves in global coordinate
/// The `offset` represents a distance the pointer moves in the global coordinate

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

/// The `offset` represents a distance the pointer moves in global coordinate
/// system of the screen.
///
/// Positive [Offset.dy] values mean pointer moves downward. Negative

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Positive [Offset.dy] values mean pointer moves downward. Negative
/// Positive [Offset.dy] values mean the pointer moves downward. Negative

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

/// system of the screen.
///
/// Positive [Offset.dy] values mean pointer moves downward. Negative
/// [Offset.dy] values mean pointer moves upwards. Accordingly, positive

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// [Offset.dy] values mean pointer moves upwards. Accordingly, positive
/// [Offset.dy] values mean the pointer moves upwards. Accordingly, positive

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

///
/// Positive [Offset.dy] values mean pointer moves downward. Negative
/// [Offset.dy] values mean pointer moves upwards. Accordingly, positive
/// [Offset.dx] values mean pointer moves towards the right. Negative

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// [Offset.dx] values mean pointer moves towards the right. Negative
/// [Offset.dx] values mean the pointer moves towards the right. Negative

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

/// Positive [Offset.dy] values mean pointer moves downward. Negative
/// [Offset.dy] values mean pointer moves upwards. Accordingly, positive
/// [Offset.dx] values mean pointer moves towards the right. Negative
/// [Offset.dx] values mean pointer moves towards left.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// [Offset.dx] values mean pointer moves towards left.
/// [Offset.dx] values mean the pointer moves towards left.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@Piinks Piinks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 12, 2023
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jan 12, 2023
@auto-submit

auto-submit Bot commented Jan 12, 2023

Copy link
Copy Markdown
Contributor

auto label is removed for flutter/flutter, pr: 118288, due to - The status or check suite Mac build_tests_1_4 has failed. Please fix the issues identified (or deflake) before re-applying this label.

@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 12, 2023
@auto-submit
auto-submit Bot merged commit c905a09 into flutter:master Jan 12, 2023
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jan 13, 2023
* f1a1f27 [M3] Add error state support for side property of CheckBox (flutter/flutter#118386)

* 27502f6 Roll Plugins from 620a059d62b2 to 39197f17ca59 (6 revisions) (flutter/flutter#118391)

* 40bc6b5 Move debug error message from failed pub to logger.printTrace (flutter/flutter#118379)

* 5630d53 [tool] Generate a binary version of the asset manifest (flutter/flutter#117233)

* c7a3f0f IconButtonTheme should be overridden by the AppBar/AppBarTheme's iconTheme and actionsIconTheme (flutter/flutter#118216)

* ee1c59d reduce pub output from flutter create (flutter/flutter#118285)

* 947b694 roll packages (flutter/flutter#118277)

* 8f365a3 [web] Update build to use generated JS runtime for Dart2Wasm. (flutter/flutter#118359)

* ace4fb5 Roll Flutter Engine from 4a8d6866a1c0 to c01465a18f31 (9 revisions) (flutter/flutter#118409)

* db8d1a4 Add MSYS2 detection on Windows Terminal (flutter/flutter#117612)

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

* 4e85235 688015782 fixed glfw example for arm64 (flutter-team-archive/engine#38426) (flutter/flutter#118413)

* 9e11d4a Use correct API docs link in create --sample help message (flutter/flutter#118371)

* 3e00520 Roll Flutter Engine from 688015782762 to 35cfe9158648 (2 revisions) (flutter/flutter#118415)

* bd938b0 Fix tap/drag callbacks firing when TapAndDragGestureRecognizer has not won the arena (flutter/flutter#118342)

* 19af46f 8aa26baa9 Roll Dart SDK from edd406c07399 to 20cca507d98b (1 revision) (flutter-team-archive/engine#38823) (flutter/flutter#118420)

* f7b444e add generated_plugins.cmake (flutter/flutter#116581)

* 40c96f1 Enable xcode cache cleanup for a few days. (flutter/flutter#118419)

* 59d737e 99509a7e4 Correct FrameTimingRecorder's raster start time. (flutter-team-archive/engine#38674) (flutter/flutter#118425)

* 9024a70 Roll Flutter Engine from 99509a7e4275 to f3f05368033b (2 revisions) (flutter/flutter#118429)

* 0752af8 Add `allowedButtonsFilter` to prevent Draggable from appearing with secondary click. (flutter/flutter#111852)

* 1578acb 15d59792e Roll Skia from dfb838747295 to 9e51c2c9e231 (26 revisions) (flutter-team-archive/engine#38827) (flutter/flutter#118432)

* 07c47dc a62d25326 Roll Skia from dfb838747295 to cc983d28f3bf (27 revisions) (flutter-team-archive/engine#38830) (flutter/flutter#118435)

* 17a855e dfa0327f8 Roll Skia from cc983d28f3bf to fd54be29a3cc (3 revisions) (flutter-team-archive/engine#38833) (flutter/flutter#118436)

* b896066 07603c6d4 Roll Dart SDK from 20cca507d98b to 3d629d00a8d7 (2 revisions) (flutter-team-archive/engine#38834) (flutter/flutter#118439)

* ddad6f1 Fix copying/applying font fallback with package (flutter/flutter#118393)

* 8889d49 dec608917 Roll Fuchsia Mac SDK from nIPtQ59jG1pxyatOq... to 21nYb648VWbpxc36t... (flutter-team-archive/engine#38839) (flutter/flutter#118445)

* 2201698 970889b87 Roll Skia from fd54be29a3cc to c72c7bf7e45b (3 revisions) (flutter-team-archive/engine#38840) (flutter/flutter#118448)
auto-submit Bot pushed a commit to flutter-team-archive/plugins that referenced this pull request Jan 13, 2023
* f1a1f27 [M3] Add error state support for side property of CheckBox (flutter/flutter#118386)

* 27502f6 Roll Plugins from 620a059 to 39197f1 (6 revisions) (flutter/flutter#118391)

* 40bc6b5 Move debug error message from failed pub to logger.printTrace (flutter/flutter#118379)

* 5630d53 [tool] Generate a binary version of the asset manifest (flutter/flutter#117233)

* c7a3f0f IconButtonTheme should be overridden by the AppBar/AppBarTheme's iconTheme and actionsIconTheme (flutter/flutter#118216)

* ee1c59d reduce pub output from flutter create (flutter/flutter#118285)

* 947b694 roll packages (flutter/flutter#118277)

* 8f365a3 [web] Update build to use generated JS runtime for Dart2Wasm. (flutter/flutter#118359)

* ace4fb5 Roll Flutter Engine from 4a8d6866a1c0 to c01465a18f31 (9 revisions) (flutter/flutter#118409)

* db8d1a4 Add MSYS2 detection on Windows Terminal (flutter/flutter#117612)

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

* 4e85235 688015782 fixed glfw example for arm64 (flutter-team-archive/engine#38426) (flutter/flutter#118413)

* 9e11d4a Use correct API docs link in create --sample help message (flutter/flutter#118371)

* 3e00520 Roll Flutter Engine from 688015782762 to 35cfe9158648 (2 revisions) (flutter/flutter#118415)

* bd938b0 Fix tap/drag callbacks firing when TapAndDragGestureRecognizer has not won the arena (flutter/flutter#118342)

* 19af46f 8aa26baa9 Roll Dart SDK from edd406c07399 to 20cca507d98b (1 revision) (flutter-team-archive/engine#38823) (flutter/flutter#118420)

* f7b444e add generated_plugins.cmake (flutter/flutter#116581)

* 40c96f1 Enable xcode cache cleanup for a few days. (flutter/flutter#118419)

* 59d737e 99509a7e4 Correct FrameTimingRecorder's raster start time. (flutter-team-archive/engine#38674) (flutter/flutter#118425)

* 9024a70 Roll Flutter Engine from 99509a7e4275 to f3f05368033b (2 revisions) (flutter/flutter#118429)

* 0752af8 Add `allowedButtonsFilter` to prevent Draggable from appearing with secondary click. (flutter/flutter#111852)

* 1578acb 15d59792e Roll Skia from dfb838747295 to 9e51c2c9e231 (26 revisions) (flutter-team-archive/engine#38827) (flutter/flutter#118432)

* 07c47dc a62d25326 Roll Skia from dfb838747295 to cc983d28f3bf (27 revisions) (flutter-team-archive/engine#38830) (flutter/flutter#118435)

* 17a855e dfa0327f8 Roll Skia from cc983d28f3bf to fd54be29a3cc (3 revisions) (flutter-team-archive/engine#38833) (flutter/flutter#118436)

* b896066 07603c6d4 Roll Dart SDK from 20cca507d98b to 3d629d00a8d7 (2 revisions) (flutter-team-archive/engine#38834) (flutter/flutter#118439)

* ddad6f1 Fix copying/applying font fallback with package (flutter/flutter#118393)

* 8889d49 dec608917 Roll Fuchsia Mac SDK from nIPtQ59jG1pxyatOq... to 21nYb648VWbpxc36t... (flutter-team-archive/engine#38839) (flutter/flutter#118445)

* 2201698 970889b87 Roll Skia from fd54be29a3cc to c72c7bf7e45b (3 revisions) (flutter-team-archive/engine#38840) (flutter/flutter#118448)
esouthren pushed a commit to esouthren/flutter that referenced this pull request Jan 15, 2023
…#118288)

* Documentation for drag/fling offset

* Fix typo

* Fix typo 2

* Fix the docs_test

* Fix the grammar