ExternalReplyInfo.fromJson constructor
Creates instance of ExternalReplyInfo from JSON data.
Implementation
factory ExternalReplyInfo.fromJson(Map<String, dynamic> json) {
return ExternalReplyInfo(
origin: MessageOrigin.fromJson(json['origin']),
chat: json['chat'] != null ? Chat.fromJson(json['chat']) : null,
messageId: json['message_id'],
linkPreviewOptions: json['link_preview_options'] != null
? LinkPreviewOptions.fromJson(json['link_preview_options'])
: null,
animation: json['animation'] != null
? Animation.fromJson(json['animation'])
: null,
audio: json['audio'] != null ? Audio.fromJson(json['audio']) : null,
document:
json['document'] != null ? Document.fromJson(json['document']) : null,
photo: json['photo'] != null
? (json['photo'] as List).map((e) => PhotoSize.fromJson(e)).toList()
: null,
sticker:
json['sticker'] != null ? Sticker.fromJson(json['sticker']) : null,
story: json['story'] != null ? Story.fromJson(json['story']) : null,
video: json['video'] != null ? Video.fromJson(json['video']) : null,
videoNote: json['video_note'] != null
? VideoNote.fromJson(json['video_note'])
: null,
voice: json['voice'] != null ? Voice.fromJson(json['voice']) : null,
hasMediaSpoiler: json['has_media_spoiler'],
contact:
json['contact'] != null ? Contact.fromJson(json['contact']) : null,
dice: json['dice'] != null ? Dice.fromJson(json['dice']) : null,
game: json['game'] != null ? Game.fromJson(json['game']) : null,
giveaway:
json['giveaway'] != null ? Giveaway.fromJson(json['giveaway']) : null,
giveawayWinners: json['giveaway_winners'] != null
? GiveawayWinners.fromJson(json['giveaway_winners'])
: null,
invoice:
json['invoice'] != null ? Invoice.fromJson(json['invoice']) : null,
location:
json['location'] != null ? Location.fromJson(json['location']) : null,
poll: json['poll'] != null ? Poll.fromJson(json['poll']) : null,
venue: json['venue'] != null ? Venue.fromJson(json['venue']) : null,
paidMedia: json['paid_media'] != null
? PaidMediaInfo.fromJson(json['paid_media'])
: null,
);
}