Skip to content

prefer_mixin lacks nuanceΒ #58543

Closed
Closed
@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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions