proper_expanded_and_flexible

SeverityQuick FixOptions
Error

Details

DO place Expanded and Flexible widgets inside a Row, Column, or Flex.

Bad
Center(
  child: Expanded(
    child: Container(),
  ),
)
Good
Row(
  children: [
    Expanded(
      child: Container(),
    ),
  ],
)

Usage

To enable the proper_expanded_and_flexible rule, add proper_expanded_and_flexible under plugins > pyramid_lint > diagnostics in your analysis_options.yaml file:

plugins:
  pyramid_lint: <version>
    diagnostics:
      proper_expanded_and_flexible: true