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

# Edge Insets

> Documentation for Edge Insets (Padding/Margin)

The Stac EdgeInsets class represents padding or margin values. It specifies offsets in each of the four directions (left, top, right, bottom) in logical pixels.

## Properties

| Property | Type      | Description                          |
| -------- | --------- | ------------------------------------ |
| left     | `double?` | Left edge inset in logical pixels.   |
| top      | `double?` | Top edge inset in logical pixels.    |
| right    | `double?` | Right edge inset in logical pixels.  |
| bottom   | `double?` | Bottom edge inset in logical pixels. |

## Constructors

### All Edges Equal

<CodeGroup>
  ```dart Dart theme={null}
  StacEdgeInsets.all(16.0)
  ```

  ```json JSON theme={null}
  16.0
  ```
</CodeGroup>

### Symmetric (Horizontal/Vertical)

<CodeGroup>
  ```dart Dart theme={null}
  StacEdgeInsets.symmetric(
    horizontal: 16.0,
    vertical: 8.0,
  )
  ```

  ```json JSON theme={null}
  {
    "left": 16.0,
    "top": 8.0,
    "right": 16.0,
    "bottom": 8.0
  }
  ```
</CodeGroup>

### Only Specific Edges

<CodeGroup>
  ```dart Dart theme={null}
  StacEdgeInsets.only(
    left: 8.0,
    top: 16.0,
    right: 8.0,
    bottom: 24.0,
  )
  ```

  ```json JSON theme={null}
  {
    "left": 8.0,
    "top": 16.0,
    "right": 8.0,
    "bottom": 24.0
  }
  ```
</CodeGroup>

### Horizontal Only

<CodeGroup>
  ```dart Dart theme={null}
  StacEdgeInsets.horizontal(16.0)
  ```

  ```json JSON theme={null}
  {
    "left": 16.0,
    "right": 16.0
  }
  ```
</CodeGroup>

### Vertical Only

<CodeGroup>
  ```dart Dart theme={null}
  StacEdgeInsets.vertical(16.0)
  ```

  ```json JSON theme={null}
  {
    "top": 16.0,
    "bottom": 16.0
  }
  ```
</CodeGroup>

## Example Usage

### With Padding Widget

<CodeGroup>
  ```dart Dart theme={null}
  StacPadding(
    padding: StacEdgeInsets.all(16.0),
    child: StacText(data: 'Padded content'),
  )
  ```

  ```json JSON theme={null}
  {
    "type": "padding",
    "padding": 16.0,
    "child": {
      "type": "text",
      "data": "Padded content"
    }
  }
  ```
</CodeGroup>

### With Container

<CodeGroup>
  ```dart Dart theme={null}
  StacContainer(
    padding: StacEdgeInsets.symmetric(
      horizontal: 24.0,
      vertical: 16.0,
    ),
    margin: StacEdgeInsets.only(bottom: 8.0),
    child: StacText(data: 'Container content'),
  )
  ```

  ```json JSON theme={null}
  {
    "type": "container",
    "padding": {
      "left": 24.0,
      "top": 16.0,
      "right": 24.0,
      "bottom": 16.0
    },
    "margin": {
      "bottom": 8.0
    },
    "child": {
      "type": "text",
      "data": "Container content"
    }
  }
  ```
</CodeGroup>
