toJson method
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'role': role,
'content': content,
if (imageUrls != null) 'imageUrls': imageUrls,
'timestamp': timestamp.toIso8601String(),
'isPartial': isPartial ?? false,
};