Skip to content

Update mixin guidance on Effective Dart #4941

@MaryaBelanger

Description

@MaryaBelanger

Page URL

https://dart.dev/effective-dart/design#avoid-mixing-in-a-class-that-isnt-intended-to-be-a-mixin

Page source

https://github.com/dart-lang/site-www/blob/main/src/effective-dart/design.md?plain=1#L728

Describe the problem

For compatibility, Dart still allows you to mix in classes that aren’t defined using mixin.

I don't think that's the case now. The purpose of adding mixin classes was to no longer have this ambiguity.

Expected fix

Rewrite the section, or more likely remove it, or maybe replace it with different guidance e.g. "DO use a mixin class to..."

Additional context

No response

Metadata

Metadata

Assignees

Labels

a.effective-dartRelates to the best practices explained in Effective Darta.languageRelates to the Dart language toure1-hoursCan complete in < 8 hours of normal, not dedicated, workfrom.teamReported by Dash docs team memberp1-highMajor but not urgent concern: Resolve in months. Update each month.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions