avoid-expanded-as-spacer
The rule detects Expanded
widgets that contain empty SizedBox/Container
and proposes to replace them with the Spacer
widget.
Example
❌ Bad:
Column(
children: [
Container(),
const Expanded(child: SizedBox()),
Container(),
]
)
✅ Good:
Column(
children: [
Container(),
const Spacer(),
Container(),
]
)