linter icon indicating copy to clipboard operation
linter copied to clipboard

Incorrect use of ParentData Widget

Open Number-3434 opened this issue 1 year ago • 3 comments

Describe the rule you'd like to see added and to what rule set

Lint

Lint to protect against the error "Incorrect Use of ParentData Widget" in Flutter.

Ruleset: flutter_lints

Number-3434 avatar Jan 14 '24 09:01 Number-3434

@goderbauer

pq avatar Jan 16 '24 14:01 pq

I am not sure how this lint would work or what cases it is supposed to catch. Can you add more context to your proposal?

goderbauer avatar Jan 16 '24 19:01 goderbauer

Usually this error occurs if a widget expects ParentData of BoxParentData and instead got FlexParentData (or vice versa).

Usually this can be fixed by inserting an Expanded widget in the correct place.

Number-3434 avatar Jan 16 '24 19:01 Number-3434