avoid-expanded-as-spacer
Suggests using the Spacer
widget instead of the Expanded
widget containing empty SizedBox/Container
widget.
Example
❌ Bad:
Column(
children: [
Container(),
const Expanded(child: SizedBox()), // LINT: Prefer replacing this widget with the 'Spacer' widget.
Container(),
],
);
✅ Good:
Column(
children: [
Container(),
const Spacer(),
Container(),
],
);