ReplyParameters.fromJson constructor

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

Creates a ReplyParameters object from a JSON object.

Implementation

factory ReplyParameters.fromJson(Map<String, dynamic> json) {
  return ReplyParameters(
    messageId: json['message_id'],
    chatId: ID.create(json['chat_id']),
    allowSendingWithoutReply: json['allow_sending_without_reply'],
    quote: json['quote'],
    quoteParseMode: json['quote_parse_mode'],
    quoteEntities: json['quote_entities'] != null
        ? (json['quote_entities'] as List)
            .map((e) => MessageEntity.fromJson(e))
            .toList()
        : null,
    quotePosition: json['quote_position'],
  );
}