copyWith method

Group copyWith({
  1. String? name,
  2. List<String>? members,
  3. bool? isPublic,
  4. String? publicLinkCode,
  5. bool? locationSharingEnabled,
})

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,
  );
}