I'm quite new to Flutter (and even more to the Freezed package...) So I hope that the question is relevant.
So, here is my usecase: a User can be Member of differents groups. A User class shares . I have issues to deal with this relationship with Freezed:
@freezed
abstract class User with _$User {
const factory User({
@required UniqueId id,
Name firstname,
Name lastname,
@required EmailAddress email,
@required bool emailVerified,
}) = _User;
}
@freezed
abstract class Member extends User with _$Member { // Here is the issue
const factory Member({
@required UniqueId id,
@required Name displayname,
String photo,
List roles,
String status,
DateTime expiration,
}) = _Member;
_$Member.copyWith' ('$MemberCopyWith Function()') isn't a valid override of '_$User.copyWith' ('$UserCopyWith Function()').
What would be the right way to do so?