Skip to main content
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',
  ),
)