Document.fromJson constructor
Creates a new Document object from json.
Implementation
factory Document.fromJson(Map<String, dynamic> json) {
return Document(
fileId: json['file_id']!,
fileUniqueId: json['file_unique_id']!,
thumbnail: json['thumbnail'] != null
? PhotoSize.fromJson(json['thumbnail']!)
: null,
fileName: json['file_name'],
mimeType: json['mime_type'],
fileSize: json['file_size'],
);
}