Skip to content

prefer_mixin lacks nuance #58543

@Hixie

Description

@Hixie

The prefer_mixin lint points out uses of with that mix in classes rather than mixins.

Unfortunately, sometimes a class is intended to be used as both a mixin and a class, and there's currently no way to indicate that a particular class is therefore ok for use with with.

Examples in Flutter's framework include WidgetsBindingObserver and ChangeNotifier.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestcustomer-flutterdevexp-linterIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.linter-false-positiveIssues related to lint rules that report a problem when it isn't a problem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions