Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.stac.dev/llms.txt

Use this file to discover all available pages before exploring further.

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

Properties

PropertyTypeDescription
childStacWidgetThe widget below this widget in the tree.
displacementdoubleThe distance from the child’s top or bottom edge to where the refresh indicator starts. Defaults to 40.
edgeOffsetdoubleThe offset where the indicator starts. Defaults to 0.
onRefreshStacActionThe callback that is called when the user has dragged the refresh indicator far enough to demonstrate that they want the app to refresh.
colorStacColorThe color of the refresh indicator.
backgroundColorStacColorThe background color of the refresh indicator.
semanticsLabelStringThe semantic label for the refresh indicator.
semanticsValueStringThe semantic value for the refresh indicator.
strokeWidthdoubleThe width of the refresh indicator’s stroke. Defaults to RefreshProgressIndicator.defaultStrokeWidth.
triggerModeStacRefreshIndicatorTriggerModeThe mode that controls when the refresh indicator will be triggered. Defaults to RefreshIndicatorTriggerMode.onEdge.

Example

StacRefreshIndicator(
  onRefresh: StacNetworkRequestAction(
    url: 'https://raw.githubusercontent.com/StacDev/stac/main/examples/stac_gallery/assets/json/list_view_example.json',
    method: Method.get,
    contentType: 'application/json',
  ),
  child: StacListView(
    children: [
      StacListTile(title: StacText(data: 'Pull down to refresh')),
      StacListTile(title: StacText(data: 'Item 1')),
      StacListTile(title: StacText(data: 'Item 2')),
      StacListTile(title: StacText(data: 'Item 3')),
    ],
  ),
)