Skip to content

[linter][prefer_const_constructors] miss opportunity #59788

@stephane-archer

Description

@stephane-archer
class _FavoriteFoldersLoadingWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return const Center(
      child: CupertinoActivityIndicator(),
    );
  }
}

should suggest

class _FavoriteFoldersLoadingWidget extends StatelessWidget {

 const _FavoriteFoldersLoadingWidget();

  @override
  Widget build(BuildContext context) {
    return const Center(
      child: CupertinoActivityIndicator(),
    );
  }
}

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-false-negativeIssues related to lint rules that fail to report a problem.type-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