ensureVisible method Null safety

Future<void> ensureVisible(
  1. Finder 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 Finder deals with widgets that's out of the screen correctly.

This does not work when the S is long and W far away from the displayed part does not have a cached element yet. See https://github.com/flutter/flutter/issues/61458

Shorthand for Scrollable.ensureVisible(element(finder))


Future<void> ensureVisible(Finder finder) => Scrollable.ensureVisible(element(finder));