InputStoryContent.fromJson constructor

InputStoryContent.fromJson(
  1. Map<String, dynamic> json
)

a InputStoryContent return type can be :

Implementation

factory InputStoryContent.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case InputStoryContentPhoto.CONSTRUCTOR:
      return InputStoryContentPhoto.fromJson(json);
    case InputStoryContentVideo.CONSTRUCTOR:
      return InputStoryContentVideo.fromJson(json);
    default:
      return const InputStoryContent();
  }
}