ThumbnailFormat.fromJson constructor
a ThumbnailFormat return type can be :
Implementation
factory ThumbnailFormat.fromJson(Map<String, dynamic> json) {
switch(json["@type"]) {
case ThumbnailFormatJpeg.CONSTRUCTOR:
return ThumbnailFormatJpeg.fromJson(json);
case ThumbnailFormatPng.CONSTRUCTOR:
return ThumbnailFormatPng.fromJson(json);
case ThumbnailFormatWebp.CONSTRUCTOR:
return ThumbnailFormatWebp.fromJson(json);
case ThumbnailFormatGif.CONSTRUCTOR:
return ThumbnailFormatGif.fromJson(json);
case ThumbnailFormatTgs.CONSTRUCTOR:
return ThumbnailFormatTgs.fromJson(json);
case ThumbnailFormatMpeg4.CONSTRUCTOR:
return ThumbnailFormatMpeg4.fromJson(json);
default:
return const ThumbnailFormat();
}
}