Skip to main content

SingleChildScrollView

The Stac SingleChildScrollView allows you to build a Flutter SingleChildScrollView widget using JSON. To know more about the SingleChildScrollView widget in Flutter, refer to the official documentation.

Properties​

PropertyTypeDescription
scrollDirectionAxisThe axis along which the scroll view scrolls. Defaults to Axis.vertical.
reverseboolWhether the scroll view scrolls in the reverse direction. Defaults to false.
paddingStacEdgeInsets?The amount of space by which to inset the child.
primarybool?Whether this is the primary scroll view associated with the parent.
physicsStacScrollPhysics?How the scroll view should respond to user input.
childMap<String, dynamic>?The widget below this widget in the tree.
dragStartBehaviorDragStartBehaviorDetermines the way that drag start behavior is handled. Defaults to DragStartBehavior.start.
clipBehaviorClipThe content will be clipped (or not) according to this option. Defaults to Clip.hardEdge.
restorationIdString?The restoration ID to save and restore the state of the scroll view.
keyboardDismissBehaviorScrollViewKeyboardDismissBehaviorConfigures how the scroll view should dismiss the keyboard. Defaults to ScrollViewKeyboardDismissBehavior.manual.

Example JSON​

{
"type": "singleChildScrollView",
"child": {
"type": "column",
"children": [
{
"type": "text",
"data": "Hello World!"
},
{
"type": "text",
"data": "This is a SingleChildScrollView widget."
},
{
"type": "text",
"data": "You can scroll vertically."
},
{
"type": "text",
"data": "You can also scroll horizontally."
}
]
}
}