WebPage.fromJson constructor
Parse from a json
Implementation
factory WebPage.fromJson(Map<String, dynamic> json) => WebPage(
url: json['url'],
displayUrl: json['display_url'],
type: json['type'],
siteName: json['site_name'],
title: json['title'],
description: FormattedText.fromJson(json['description']),
photo: json['photo'] == null ? null : Photo.fromJson(json['photo']),
embedUrl: json['embed_url'],
embedType: json['embed_type'],
embedWidth: json['embed_width'],
embedHeight: json['embed_height'],
duration: json['duration'],
author: json['author'],
animation: json['animation'] == null ? null : Animation.fromJson(json['animation']),
audio: json['audio'] == null ? null : Audio.fromJson(json['audio']),
document: json['document'] == null ? null : Document.fromJson(json['document']),
sticker: json['sticker'] == null ? null : Sticker.fromJson(json['sticker']),
video: json['video'] == null ? null : Video.fromJson(json['video']),
videoNote: json['video_note'] == null ? null : VideoNote.fromJson(json['video_note']),
voiceNote: json['voice_note'] == null ? null : VoiceNote.fromJson(json['voice_note']),
instantViewVersion: json['instant_view_version'] ?? 0,
extra: json['@extra'],
clientId: json['@client_id'],
);