toJson method

Map<String, dynamic> toJson()

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,
    };