StoryContent.fromJson constructor
a StoryContent return type can be :
Implementation
factory StoryContent.fromJson(Map<String, dynamic> json) {
switch (json["@type"]) {
case StoryContentPhoto.CONSTRUCTOR:
return StoryContentPhoto.fromJson(json);
case StoryContentVideo.CONSTRUCTOR:
return StoryContentVideo.fromJson(json);
case StoryContentUnsupported.CONSTRUCTOR:
return StoryContentUnsupported.fromJson(json);
default:
return const StoryContent();
}
}