ReplyMessage.fromJson constructor

ReplyMessage.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory ReplyMessage.fromJson(Map<String, dynamic> json) => ReplyMessage(
      message: json['message']?.toString() ?? '',
      replyBy: json['replyBy']?.toString() ?? '',
      replyTo: json['replyTo']?.toString() ?? '',
      messageType: MessageType.tryParse(json['message_type']?.toString()) ??
          MessageType.text,
      messageId: json['id']?.toString() ?? '',
      voiceMessageDuration: Duration(
        microseconds:
            int.tryParse(json['voiceMessageDuration'].toString()) ?? 0,
      ),
    );