toJson method
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'createdOn': createdOn.toIso8601String(),
'updatedOn': updatedOn?.toIso8601String(),
'type': type,
'subscriptionType': subscriptionType,
'lastMessage': lastMessage?.toJson(),
'membersId': membersId,
'members': Map.fromEntries(
members.entries.map(
(e) => MapEntry(e.key, e.value.toJson()),
),
),
};