EnsureVisible typedef Null safety

EnsureVisible = Future<bool> Function(String id, {Curve curve, Duration duration, Curve jumpCurve, Duration jumpDuration})

A callback to scroll the anchor identified by id into the viewport.

By default, an internal implementation is given to WidgetFactory.onTapAnchor when an anchor is tapped to handle the scrolling. A wf subclass can use this to change the curve, the animation duration or even request scrolling to a different anchor.

The future is resolved after scrolling is completed. It will be true if scrolling succeed or false otherwise.

Implementation

typedef EnsureVisible = Future<bool> Function(
  String id, {
  Curve curve,
  Duration duration,
  Curve jumpCurve,
  Duration jumpDuration,
});