FileType.fromJson constructor
a FileType return type can be :
Implementation
factory FileType.fromJson(Map<String, dynamic> json) {
switch(json["@type"]) {
case FileTypeNone.CONSTRUCTOR:
return FileTypeNone.fromJson(json);
case FileTypeAnimation.CONSTRUCTOR:
return FileTypeAnimation.fromJson(json);
case FileTypeAudio.CONSTRUCTOR:
return FileTypeAudio.fromJson(json);
case FileTypeDocument.CONSTRUCTOR:
return FileTypeDocument.fromJson(json);
case FileTypePhoto.CONSTRUCTOR:
return FileTypePhoto.fromJson(json);
case FileTypeProfilePhoto.CONSTRUCTOR:
return FileTypeProfilePhoto.fromJson(json);
case FileTypeSecret.CONSTRUCTOR:
return FileTypeSecret.fromJson(json);
case FileTypeSecretThumbnail.CONSTRUCTOR:
return FileTypeSecretThumbnail.fromJson(json);
case FileTypeSecure.CONSTRUCTOR:
return FileTypeSecure.fromJson(json);
case FileTypeSticker.CONSTRUCTOR:
return FileTypeSticker.fromJson(json);
case FileTypeThumbnail.CONSTRUCTOR:
return FileTypeThumbnail.fromJson(json);
case FileTypeUnknown.CONSTRUCTOR:
return FileTypeUnknown.fromJson(json);
case FileTypeVideo.CONSTRUCTOR:
return FileTypeVideo.fromJson(json);
case FileTypeVideoNote.CONSTRUCTOR:
return FileTypeVideoNote.fromJson(json);
case FileTypeVoiceNote.CONSTRUCTOR:
return FileTypeVoiceNote.fromJson(json);
case FileTypeWallpaper.CONSTRUCTOR:
return FileTypeWallpaper.fromJson(json);
default:
return const FileType();
}
}