toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  return <String, dynamic>{
    'id': id,
    'title': title,
    'participants': participants.map((x) => x.toMap()).toList(),
    'members': members.map((x) => x.toMap()).toList(),
    'code': code,
    'createdAt': createdAt.toString(),
    'latestJoinedAt': latestJoinedAt.toString(),
    'status': status.status,
    'latestMessage': latestMessage?.toMap(),
  };
}