Skip to main content
The StacDialogAction class is used to display a dialog in Stac applications.

Properties

PropertyTypeDescription
widgetMap<String, dynamic>The widget to display inside the dialog.
requestStacNetworkRequestThe network request to perform before displaying the dialog.
assetPathStringThe asset path of the widget to display inside the dialog.
barrierDismissibleboolWhether the dialog is dismissible by tapping outside. Defaults to true.
barrierColorStacColorThe color of the modal barrier.
barrierLabelStringThe semantic label for the modal barrier.
useSafeAreaboolWhether to use the safe area. Defaults to true.
traversalEdgeBehaviorStacTraversalEdgeBehaviorThe traversal edge behavior of the dialog.

Examples

Dialog with a Widget

StacDialogAction(
  widget: StacText(data: 'Hello, World!'),
)

Dialog with a Request

StacDialogAction(
  request: StacNetworkRequest(
    url: 'https://example.com/api',
    method: Method.get,
  ),
)

Dialog with an Asset

StacDialogAction(
  assetPath: 'assets/dialog.json',
)