scrollIntoView method

Future<void> scrollIntoView (SerializableFinder finder, { double alignment: 0.0, Duration timeout })

Scrolls the Scrollable ancestor of the widget located by finder until the widget is completely visible.

If the widget located by finder is contained by a scrolling widget that lazily creates its children, like ListView or CustomScrollView, then this method may fail because finder doesn't actually exist. The scrollUntilVisible method can be used in this case.

Implementation

Future<void> scrollIntoView(SerializableFinder finder, { double alignment = 0.0, Duration timeout }) async {
  timeout ??= _shortTimeout(timeoutMultiplier);
  await _sendCommand(ScrollIntoView(finder, alignment: alignment, timeout: timeout));
}