controller property

ScrollController? controller

An object that can be used to control the position to which this widget is scrolled.

A ScrollController serves several purposes. It can be used to control the initial scroll position (see ScrollController.initialScrollOffset). It can be used to control whether the scroll view should automatically save and restore its scroll position in the PageStorage (see ScrollController.keepScrollOffset). It can be used to read the current scroll position (see ScrollController.offset), or change it (see ScrollController.animateTo).

If null, a ScrollController will be created internally by Scrollable in order to create and manage the ScrollPosition.

See also:


final ScrollController? controller;