# use_spacer

| Severity | Quick Fix | Options |
|:--------:|:---------:|:-------:|
|   Info   |    ✅     |   ❌    |

## Details

**PREFER** using `Spacer` instead of `Expanded` with an empty Container or SizedBox.

```dart title="Bad"
Column(
  children: [
    Expanded(
      flex: 2,
      child: SizedBox(),
    ),
  ],
)
```

```dart title="Good"
Column(
  children: [
    Spacer(flex: 2),
  ],
)
```

## Usage

To enable the `use_spacer` rule, add `use_spacer` under `plugins > pyramid_lint > diagnostics` in your `analysis_options.yaml` file:

```yaml
plugins:
  pyramid_lint: <version>
    diagnostics:
      use_spacer: true
```
