Skip to main content
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
scrollDirectionStacAxisThe axis along which the scroll view scrolls. Defaults to Axis.vertical.
reverseboolWhether the scroll view scrolls in the reverse direction. Defaults to false.
paddingStacEdgeInsetsThe amount of space by which to inset the child.
primaryboolWhether this is the primary scroll view associated with the parent.
physicsStacScrollPhysicsHow the scroll view should respond to user input.
childStacWidgetThe widget below this widget in the tree.
dragStartBehaviorStacDragStartBehaviorDetermines the way that drag start behavior is handled. Defaults to DragStartBehavior.start.
clipBehaviorStacClipThe content will be clipped (or not) according to this option. Defaults to Clip.hardEdge.
restorationIdStringThe restoration ID to save and restore the state of the scroll view.
keyboardDismissBehaviorStacScrollViewKeyboardDismissBehaviorConfigures how the scroll view should dismiss the keyboard. Defaults to ScrollViewKeyboardDismissBehavior.manual.

Example

StacSingleChildScrollView(
  child: StacColumn(
    children: [
      StacText(data: 'Hello World!'),
      StacText(data: 'This is a SingleChildScrollView widget.'),
      StacText(data: 'You can scroll vertically.'),
      StacText(data: 'You can also scroll horizontally.'),
    ],
  ),
)