Skip to main content

Dialog Action

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

Properties​

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

Example JSON​

Dialog with a Widget JSON​

{
"actionType": "showDialog",
"widget": {
"type": "text",
"data": "Hello, World!"
}
}

Dialog with a Request JSON​

{
"actionType": "showDialog",
"request": {
"url": "https://example.com/api",
"method": "get"
}
}

Dialog with an Asset JSON​

{
"actionType": "showDialog",
"assetPath": "assets/dialog.json"
}