- override
Calls the widget's builder
by default.
Subclasses can override this method to build the interior of their
scrollable widget. Scrollable wraps the returned widget in a
GestureDetector
to observe the user's interaction with this widget and
to adjust the scroll offset accordingly.
The widgets used by this method should be widgets that provide a
layout-time callback that reports the sizes that are relevant to
the scroll offset (typically the size of the scrollable
container and the scrolled contents). Viewport
provides an
onPaintOffsetUpdateNeeded
callback for this purpose; GridViewport
,
ListViewport
, LazyListViewport
, and LazyBlockViewport
provide an
onExtentsChanged
callback for this purpose.
This callback should be used to update the scroll behavior, if
necessary, and then to call updateGestureDetector
to update
the gesture detectors accordingly.
Source
@override Widget buildContent(BuildContext context) { return new PageViewport( itemsWrap: config.itemsWrap, mainAxis: config.scrollDirection, anchor: config.scrollAnchor, startOffset: scrollOffset, children: config.children ); }