WebPage.fromJson constructor
Parses a WebPage from TDLib JSON.
Implementation
factory WebPage.fromJson(Map<String, dynamic> json) => WebPage(
url: _readString(json['url']),
displayUrl: _readString(json['display_url']),
type: _readString(json['type']),
siteName: _readString(json['site_name']),
title: _readString(json['title']),
description: _readObject(json['description'], FormattedText.fromJson),
photo: _readOptional(json['photo'], Photo.fromJson),
embedUrl: _readString(json['embed_url']),
embedType: _readString(json['embed_type']),
embedWidth: _readInt(json['embed_width']),
embedHeight: _readInt(json['embed_height']),
duration: _readInt(json['duration']),
author: _readString(json['author']),
hasLargeMedia: _readBool(json['has_large_media']),
showLargeMedia: _readBool(json['show_large_media']),
skipConfirmation: _readBool(json['skip_confirmation']),
showAboveText: _readBool(json['show_above_text']),
animation: _readOptional(json['animation'], Animation.fromJson),
audio: _readOptional(json['audio'], Audio.fromJson),
document: _readOptional(json['document'], Document.fromJson),
sticker: _readOptional(json['sticker'], Sticker.fromJson),
video: _readOptional(json['video'], Video.fromJson),
videoNote: _readOptional(json['video_note'], VideoNote.fromJson),
voiceNote: _readOptional(json['voice_note'], VoiceNote.fromJson),
storySenderChatId: _readInt(json['story_sender_chat_id']),
storyId: _readInt(json['story_id']),
instantViewVersion: _readInt(json['instant_view_version']),
extra: json['@extra'],
clientId: _readClientId(json['@client_id']),
);