toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'id': id,
'group_type': groupType,
'name': name,
'driver_user_id': driverUserId,
'allow_replies': allowReplies,
'status': status,
'created_at': createdAt?.toIso8601String(),
'updated_at': updatedAt?.toIso8601String(),
'participants': participants.map((e) => e.toJson()).toList(),
'driver_user': driverUser?.toJson(),
'creator': creator?.toJson(),
'last_message': lastMessage?.toJson(),
'unread_count': unreadCount,
};
}