ScrollView
Overview
A container that makes content scrollable when it overflows the screen. For example, use it on a detail page built from several sections.
Properties
| Property | Description | Value | Default |
|---|---|---|---|
scrollDirection | Sets the axis (horizontal or vertical) content scrolls along. | horizontal, vertical | vertical |
reverse | Flips the scroll start position to the opposite end. | On/off | Off |
padding | Sets the inner padding around the content. When it isn't set, no padding is applied. | Padding value | Not set |
controller | Connects a controller that drives the scroll position. It's ignored when scroll areas are nested and share the default controller. | Controller | Not set |
primary | Sets whether to attach to the default scroll controller. Sharing happens only when scroll areas are nested; elsewhere the view runs on its own controller. | On/off | Off |
physics | Sets how scrolling responds — momentum, boundary handling, and so on. | bouncing, clamping, alwaysScrollable, rangeMaintaining, neverScrollable, page | Not set |
dragStartBehavior | Sets the criterion for detecting when a drag starts. | down, start | start |
clipBehavior | Sets how content that overflows the area is clipped. | none, hardEdge, antiAlias, antiAliasWithSaveLayer | hardEdge |
restorationId | Sets the identifier used to save and restore the scroll position. | String | Not set |
keyboardDismissBehavior | Sets whether the keyboard closes automatically while scrolling (dragging). | manual, onDrag | manual |