FileType.fromJson constructor
Parses whichever FileType subtype the JSON describes.
Implementation
factory FileType.fromJson(Map<String, dynamic> json) {
final object = tdObjectFactories[json['@type']]?.call(json);
return object is FileType ? object : UndecodedFileType(json);
}