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.
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.
Ideally the macro could add the mixin application itself, but currently the API only allows adding members to a class.