TextPatternScannerIntroImage.fromJson constructor

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

Implementation

factory TextPatternScannerIntroImage.fromJson(Map<String, dynamic> json) {
  String _type = json["_type"];
  switch (_type) {
    case "TextPatternIntroGeneralField":
      return TextPatternIntroGeneralField.fromJson(json);
    case "TextPatternIntroAlphabeticField":
      return TextPatternIntroAlphabeticField.fromJson(json);
    case "TextPatternIntroMeterDevice":
      return TextPatternIntroMeterDevice.fromJson(json);
    case "TextPatternIntroShippingContainer":
      return TextPatternIntroShippingContainer.fromJson(json);
    case "TextPatternIntroNoImage":
      return TextPatternIntroNoImage.fromJson(json);
    case "TextPatternIntroCustomImage":
      return TextPatternIntroCustomImage.fromJson(json);
    default:
      throw ArgumentError("Invalid polymorphic type: $_type");
  }
}