Skip to content

WidgetTester.dragUntilVisible() docs to say "use negative offset to swipe up" #89332

Description

@mleonhard

Use case

I need to use WidgetTester.dragUntilVisible() (inherited from WidgetController.dragUntilVisible). The method takes a moveStep parameter of type Offset. I need to know what numerical dx and dy values to pass to the Offset constructor.

I discovered the information by trial-and-error. That took some time because of #88756, #88763 , #88759, and #88762. dragUntilVisible() uses a negative offset to scroll down, while scrollUntilVisible() uses a positive one.

Proposal

Update the docs to say:

moveStep is the movement of the virtual finger on the virtual screen. To swipe up (scroll down), use negative dy and dx=0. To swipe right, use positive dx and dy=0.

Activity

  1. added
    in triagePresently being triaged by the triage team
    a: tests"flutter test", flutter_test, or one of our tests
    frameworkflutter/packages/flutter repository. See also f: labels.
    c: proposalA detailed proposal for a change to Flutter
    and removed
    in triagePresently being triaged by the triage team
    on Sep 2, 2021
  2. added
    P2Important issues not at the top of the work list
    on Mar 23, 2022
  3. added a commit that references this issue on Jun 11, 2026
    5e45c42
  4. added a commit that references this issue on Jun 26, 2026
    e4834e9
  5. github-actions commented on Jul 14, 2026

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  6. locked as resolved and limited conversation to collaborators on Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our testsc: proposalA detailed proposal for a change to Flutterd: api docsIssues with https://api.flutter.dev/frameworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions