scrollTo method

Future<PatrolFinder> scrollTo({
  1. Finder? view,
  2. double step = defaultScrollDelta,
  3. AxisDirection? scrollDirection,
  4. int maxScrolls = defaultScrollMaxIteration,
  5. Duration? settleBetweenScrollsTimeout,
  6. Duration? dragDuration,
  7. SettlePolicy? settlePolicy,
})

Shorthand for PatrolTester.scrollUntilVisible.

Scrolls view in scrollDirection until this finders finds at least one visible widget.

It also ensures that view is visible, by calling PatrolFinder.waitUntilVisible.

See also:

  • PatrolTester.scrollUntilVisible, which this method wraps

Implementation

Future<PatrolFinder> scrollTo({
  Finder? view,
  double step = defaultScrollDelta,
  AxisDirection? scrollDirection,
  int maxScrolls = defaultScrollMaxIteration,
  Duration? settleBetweenScrollsTimeout,
  Duration? dragDuration,
  SettlePolicy? settlePolicy,
}) {
  return tester.scrollUntilVisible(
    finder: finder,
    view: view,
    delta: step,
    scrollDirection: scrollDirection,
    maxScrolls: maxScrolls,
    settleBetweenScrollsTimeout: settleBetweenScrollsTimeout,
    settlePolicy: settlePolicy,
    dragDuration: dragDuration,
  );
}