toJson method
Converts this message to JSON-like map data.
Implementation
Map<String, dynamic> toJson() {
return {
'id': id,
'user': user.toJson(),
'user_id': userId,
'content': content,
'flow': flow,
'role': role,
'createdAt': createdAt,
'updatedAt': updatedAt,
'widget_defination': widgetDefination ?? "{}",
'thread_id': threadId,
};
}