toJson method
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'message': message,
'createdAt': createdAt.toIso8601String(),
'sentBy': sentBy,
'reply_message': replyMessage.toJson(),
'reaction': reaction.toJson(),
'message_type': messageType.name,
'voice_message_duration': voiceMessageDuration?.inMicroseconds,
'status': status.name,
};