toMap method
//////////// //////////// Converts Group to a map for Firestore
Implementation
// II.D - Conversion Methods
///////////////
/// Converts Group to a map for Firestore
Map<String, dynamic> toMap() {
final map = {
'name': name,
'createdBy': createdBy,
'members': members,
'isPublic': isPublic,
'createdAt': createdAt,
'locationSharingEnabled': locationSharingEnabled,
};
if (publicLinkCode != null) {
map['publicLinkCode'] = publicLinkCode!;
}
return map;
}