MessageExtendedMedia.fromJson constructor
a MessageExtendedMedia return type can be :
Implementation
factory MessageExtendedMedia.fromJson(Map<String, dynamic> json) {
switch (json["@type"]) {
case MessageExtendedMediaPreview.CONSTRUCTOR:
return MessageExtendedMediaPreview.fromJson(json);
case MessageExtendedMediaPhoto.CONSTRUCTOR:
return MessageExtendedMediaPhoto.fromJson(json);
case MessageExtendedMediaVideo.CONSTRUCTOR:
return MessageExtendedMediaVideo.fromJson(json);
case MessageExtendedMediaUnsupported.CONSTRUCTOR:
return MessageExtendedMediaUnsupported.fromJson(json);
default:
return const MessageExtendedMedia();
}
}