> ## 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.

# Dialog Action

> Documentation for Dialog Action

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

## Properties

| Property              | Type                        | Description                                                               |
| --------------------- | --------------------------- | ------------------------------------------------------------------------- |
| widget                | `Map<String, dynamic>`      | The widget to display inside the dialog.                                  |
| request               | `StacNetworkRequest`        | The network request to perform before displaying the dialog.              |
| assetPath             | `String`                    | The asset path of the widget to display inside the dialog.                |
| barrierDismissible    | `bool`                      | Whether the dialog is dismissible by tapping outside. Defaults to `true`. |
| barrierColor          | `StacColor`                 | The color of the modal barrier.                                           |
| barrierLabel          | `String`                    | The semantic label for the modal barrier.                                 |
| useSafeArea           | `bool`                      | Whether to use the safe area. Defaults to `true`.                         |
| traversalEdgeBehavior | `StacTraversalEdgeBehavior` | The traversal edge behavior of the dialog.                                |

## Examples

### Dialog with a Widget

<CodeGroup>
  ```dart Dart theme={null}
  StacDialogAction(
    widget: StacText(data: 'Hello, World!'),
  )
  ```

  ```json JSON theme={null}
  {
    "actionType": "showDialog",
    "widget": {
      "type": "text",
      "data": "Hello, World!"
    }
  }
  ```
</CodeGroup>

### Dialog with a Request

<CodeGroup>
  ```dart Dart theme={null}
  StacDialogAction(
    request: StacNetworkRequest(
      url: 'https://example.com/api',
      method: Method.get,
    ),
  )
  ```

  ```json JSON theme={null}
  {
    "actionType": "showDialog",
    "request": {
      "url": "https://example.com/api",
      "method": "get"
    }
  }
  ```
</CodeGroup>

### Dialog with an Asset

<CodeGroup>
  ```dart Dart theme={null}
  StacDialogAction(
    assetPath: 'assets/dialog.json',
  )
  ```

  ```json JSON theme={null}
  {
    "actionType": "showDialog",
    "assetPath": "assets/dialog.json"
  }
  ```
</CodeGroup>
