linter icon indicating copy to clipboard operation
linter copied to clipboard

`sized_box_for_whitespace` inconsistency

Open nate-thegrate opened this issue 6 months ago • 0 comments

The sized_box_for_whitespace rule only activates when the Container has a child, perhaps because swapping out the Container's default LimitedBox child could cause behavioral changes.

But this means that the linter rule's example wouldn't actually trigger the rule:

BAD:

Widget buildRow() {
  return Row(
    children: <Widget>[
      const MyLogo(),
      Container(width: 4),
      const Expanded(
        child: Text('...'),
      ),
    ],
  );
}

nate-thegrate avatar Aug 19 '24 19:08 nate-thegrate