Skip to content

unnecassary_stack, unnecassary_row, and unnecassary_column #59369

@Number-3434

Description

@Number-3434

Lint that informs when a Stack, Row, or Column only has a single child in the children parameter.

// BAD, has only one child in children
const Stack(children: [Text('Hello World!')]),
const Row(children: [Text('Hello World!')]),
const Column(children: [Text('Hello World!')]),

// GOOD, has more than one child in children
const Stack(children: [Text('Hello World!'), Text('Hello World Again!')]),
const Row(children: [Text('Hello World!'), Text('Hello World Again!')]),
const Column(children: [Text('Hello World!'), Text('Hello World Again!')]),

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packagelinter-lint-proposaltype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions