ensureVisible method

Future<void> ensureVisible(
  1. Rect rect, {
  2. Duration duration = const Duration(milliseconds: 200),
  3. double margin = 0,
})

Ensure the specified area is visible inside the view port.

If the area is larger than the view port, the area is zoomed to fit the view port. margin adds extra margin to the area.

Implementation

Future<void> ensureVisible(
  Rect rect, {
  Duration duration = const Duration(milliseconds: 200),
  double margin = 0,
}) =>
    _state._ensureVisible(rect, duration: duration, margin: margin);