15
6
Avoid using Column or Row with only one child.
Row( children: [ Placeholder(), ], )
Align( child: Placeholder(), ) // or Center( child: Placeholder(), )
To enable the avoid_single_child_in_flex rule, add avoid_single_child_in_flex under custom_lint > rules in your analysis_options.yaml file:
avoid_single_child_in_flex
analysis_options.yaml
custom_lint: rules: - avoid_single_child_in_flex