Open
Description
I think it'd be nice to have a linter rule that recommends using with
rather than extends
when inheriting from a mixin class
.
For example:
class A extends ChangeNotifier {}
class B with ChangeNotifier {}
I believe that B
offers improved readability, since it's much clearer that the class could inherit from ChangeNotifier
while also extending from something else.
- It gives a better intuition about different ways the class could be restructured in the future.
- If the class is part of a public package, anyone reading it would gain a better intuition about how
ChangeNotifier
could be used in their own projects.