ensureVisible method
- FinderBase<
Element> finder
Given a widget W specified by finder and a Scrollable widget S in
its ancestry tree, this scrolls S so as to make W visible.
Usually the finder for this method should be labeled skipOffstage: false, so that the Finder deals with widgets that are off the screen
correctly.
This does not work when S is long enough, and W far away enough from
the displayed part of S, that S has not yet cached W's element.
Consider using scrollUntilVisible in such a situation.
See also:
- Scrollable.ensureVisible, which is the production API used to implement this method.
Implementation
Future<void> ensureVisible(finders.FinderBase<Element> finder) =>
Scrollable.ensureVisible(element(finder));