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

Properties

PropertyTypeDescription
sliversList<StacWidget>The slivers to place inside the viewport.
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.
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

StacCustomScrollView(
  slivers: [
    StacSliverAppBar(
      title: StacText(data: 'SliverAppBar'),
      leading: StacIconButton(
        icon: StacIcon(iconType: 'material', icon: 'menu'),
        onPressed: {},
      ),
      backgroundColor: 'primary',
    ),
  ],
)