Skip to content

Ability to add mixins to classes #30

Description

@TimWhiting

I think there should be a way to add mixins / implements / extends clauses to classes. Freezed requires a mixin for creating switch like functions for union classes. But currently you have to annotate it like this.

@freezed
class Person with _$Person {
  factory Person({ String? name, int? age }) = _Person;
}

Ideally the macro could add the mixin application itself, but currently the API only allows adding members to a class.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions