copyWith method
Creates a copy of this Group with optional parameter updates
Implementation
Group copyWith({
String? name,
List<String>? members,
bool? isPublic,
String? publicLinkCode,
bool? locationSharingEnabled,
}) {
return Group(
id: id,
name: name ?? this.name,
createdBy: createdBy,
members: members ?? this.members,
isPublic: isPublic ?? this.isPublic,
publicLinkCode: publicLinkCode ?? this.publicLinkCode,
createdAt: createdAt,
locationSharingEnabled: locationSharingEnabled ?? this.locationSharingEnabled,
);
}