# BarcodeItem.fromJson constructor

BarcodeItem.fromJson(

1. Map<String, dynamic> json

)

## Implementation

    factory BarcodeItem.fromJson(Map<String, dynamic> json) => BarcodeItem(
          text: json["text"] as String,
          rawBytes: uintListFromString(json["rawBytes"] as String),
          rawBytesEncodings: (json["rawBytesEncodings"] as List<dynamic>)
              .map((it) => RangeEncoding.fromJson(it as Map<String, dynamic>))
              .toList(),
          structuredAppendInfo: (json["structuredAppendInfo"] != null
              ? StructuredAppendInfo.fromJson(
                  json["structuredAppendInfo"] as Map<String, dynamic>)
              : null),
          format: json.containsKey("format")
              ? BarcodeFormat.values.byName(json["format"] as String)
              : BarcodeFormat.NONE,
          quad: (json["quad"] as List<dynamic>)
              .map((it) => Point<int>(
                  ((it as Map<String, dynamic>)["x"] as int), ((it)["y"] as int)))
              .toList(),
          quadNormalized: (json["quadNormalized"] as List<dynamic>)
              .map((it) => Point<double>(
                  ((it as Map<String, dynamic>)["x"] as num).toDouble(),
                  ((it)["y"] as num).toDouble()))
              .toList(),
          extendedQuad: (json["extendedQuad"] as List<dynamic>)
              .map((it) => Point<int>(
                  ((it as Map<String, dynamic>)["x"] as int), ((it)["y"] as int)))
              .toList(),
          extendedQuadNormalized:
              (json["extendedQuadNormalized"] as List<dynamic>)
                  .map((it) => Point<double>(
                      ((it as Map<String, dynamic>)["x"] as num).toDouble(),
                      ((it)["y"] as num).toDouble()))
                  .toList(),
          isUpsideDown: json.containsKey("isUpsideDown")
              ? (json["isUpsideDown"] as bool)
              : false,
          sourceImage: json.containsKey("sourceImage")
              ? (json["sourceImage"] != null
                  ? ImageRef.fromJson(json["sourceImage"] as Map<String, dynamic>)
                  : null)
              : null,
          upcEanExtension: json["upcEanExtension"] as String,
          isGS1Message: json.containsKey("isGS1Message")
              ? (json["isGS1Message"] as bool)
              : false,
          isGS1CompositePart: json.containsKey("isGS1CompositePart")
              ? (json["isGS1CompositePart"] as bool)
              : false,
          dataBarStackSize: json.containsKey("dataBarStackSize")
              ? (json["dataBarStackSize"] as int)
              : 1,
          sizeScore: json.containsKey("sizeScore")
              ? (json["sizeScore"] as num).toDouble()
              : 0.0,
          extractedDocument: (json["extractedDocument"] != null
              ? GenericDocument.fromJson(
                  json["extractedDocument"] as Map<String, dynamic>)
              : null),
          globalIndex:
              json.containsKey("globalIndex") ? (json["globalIndex"] as int) : -1,
        );