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

# Multi Action

> Documentation for Multi Action

The `StacMultiAction` allows you to execute multiple actions with ease.

## Multi Action Properties

| Property | Type               | Description                                                                    |
| -------- | ------------------ | ------------------------------------------------------------------------------ |
| actions  | `List<StacAction>` | The list of actions to be performed                                            |
| sync     | `bool`             | Whether to execute the actions in syncronous or parallel. Defaults to `false`. |

## Example

This example will allow you to show a snackbar through `StacShowSnackBarAction`, execute a network request through `StacNetworkRequest` and show another snackbar right after.

<CodeGroup>
  ```dart Dart theme={null}
  StacMultiAction(
    sync: true,
    actions: [
      StacSnackBarAction(
        content: StacText(data: 'Executing request...'),
        action: StacSnackBarActionButton(
          label: 'Done',
          textColor: StacColors.blue,
          onPressed: StacNoneAction(),
        ),
        behavior: SnackBarBehavior.floating,
      ),
      StacNetworkRequestAction(
        url: 'https://example.com/api',
        method: Method.get,
        queryParameters: {'page': 1},
        headers: {'Authorization': 'Bearer token'},
        contentType: 'application/json',
        body: {'data': 'example'},
        results: [
          StacNetworkResult(statusCode: 200, action: StacNoneAction()),
          StacNetworkResult(statusCode: 404, action: StacNoneAction()),
        ],
      ),
      StacSnackBarAction(
        content: StacText(data: 'Request executed'),
        action: StacSnackBarActionButton(
          label: 'Done',
          textColor: StacColors.blue,
          onPressed: StacNoneAction(),
        ),
        behavior: SnackBarBehavior.floating,
      ),
    ],
  )
  ```

  ```json JSON theme={null}
  {
    "actionType": "multiAction",
    "sync": true,
    "actions": [
      {
          "actionType": "showSnackBar",
          "content": {
              "type": "text",
              "data": "Executing request..."
          },
          "action": {
              "label": "Done",
              "textColor": "#73C2FB",
              "onPressed": {}
          },
          "behavior": "floating"
      },
      {
          "actionType": "networkRequest",
          "url": "https://example.com/api",
          "method": "get",
          "queryParameters": {
              "page": 1
          },
          "headers": {
              "Authorization": "Bearer token"
          },
          "contentType": "application/json",
          "body": {
              "data": "example"
          },
          "results": [
              {
              "statusCode": 200,
              "action": {
                  "actionType": "none"
              }
              },
              {
              "statusCode": 404,
              "action": {
                  "actionType": "none"
              }
              }
          ]
      },
      {
          "actionType": "showSnackBar",
          "content": {
              "type": "text",
              "data": "Request executed"
          },
          "action": {
              "label": "Done",
              "textColor": "#73C2FB",
              "onPressed": {}
          },
          "behavior": "floating"
      }
    ]
  }
  ```
</CodeGroup>
