DocumentDataExtractorIntroImage.fromJson constructor

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

Implementation

factory DocumentDataExtractorIntroImage.fromJson(Map<String, dynamic> json) {
  String _type = json["_type"];
  switch (_type) {
    case "DocumentDataIntroDefaultImage":
      return DocumentDataIntroDefaultImage.fromJson(json);
    case "DocumentDataIntroNoImage":
      return DocumentDataIntroNoImage.fromJson(json);
    case "DocumentDataIntroCustomImage":
      return DocumentDataIntroCustomImage.fromJson(json);
    default:
      throw ArgumentError("Invalid polymorphic type: $_type");
  }
}