fromMap static method

PrinterInfo fromMap(
  1. Map map
)

Implementation

static PrinterInfo fromMap(Map<dynamic, dynamic> map) {
  Model model = Model.fromMap(map["printerModel"]);
  TimeoutSetting timeout = TimeoutSetting.fromMap(map["timeout"]);
  PrinterInfo info = PrinterInfo(
      printerModel: model,
      port: Port.fromMap(map["port"]),
      ipAddress: map["ipAddress"],
      macAddress: map["macAddress"],
      localName: map["localName"],
      lastConnectedAddress: map["lastConnectedAddress"],
      paperSize: PaperSize.fromMap(map["paperSize"]),
      orientation: Orientation.fromMap(map["orientation"]),
      numberOfCopies: map["numberOfCopies"],
      halftone: Halftone.fromMap(map["halftone"]),
      printMode: PrintMode.fromMap(map["printMode"]),
      align: Align.fromMap(map["align"]),
      valign: VAlign.fromMap(map["valign"]),
      margin: Margin.fromMap(map["margin"]),
      pjCarbon: map["pjCarbon"],
      pjDensity: map["pjDensity"],
      pjFeedMode: PjFeedMode.fromMap(map["pjFeedMode"]),
      customPaperWidth: map["customPaperWidth"],
      customPaperLength: map["customPaperLength"],
      customFeed: map["customFeed"],
      rjDensity: map["rjDensity"],
      rotate180: map["rotate180"],
      peelMode: map["peelMode"],
      mirrorPrint: map["mirrorPrint"],
      paperPosition: Align.fromMap(map["paperPosition"]),
      isAutoCut: map["isAutoCut"],
      isCutAtEnd: map["isCutAtEnd"],
      mode9: map["mode9"],
      skipStatusCheck: map["skipStatusCheck"],
      checkPrintEnd: CheckPrintEnd.fromMap(map["checkPrintEnd"]),
      rollPrinterCase: PjRollCase.fromMap(map["rollPrinterCase"]),
      pjSpeed: map["pjSpeed"],
      thresholdingValue: map["thresholdingValue"],
      //this.timeout = new TimeoutSetting(),
      dashLine: map["dashLine"],
      savePrnPath: map["savePrnPath"],
      overwrite: map["overwrite"],
      isHalfCut: map["isHalfCut"],
      isSpecialTape: map["isSpecialTape"],
      labelNameIndex: map["labelNameIndex"],
      customPaper: map["customPaper"],
      //binCustomPaper: map["binCustomPaper"],
      customPaperInfo: CustomPaperInfo.fromMap(map["customPaperInfo"]),
      isLabelEndCut: map["isLabelEndCut"],
      printQuality: PrintQuality.fromMap(map["printQuality"]),
      labelMargin: map["labelMargin"],
      scaleValue: map["scaleValue"],
      isCutMark: map["isCutMark"],
      softFocusing: map["softFocusing"],
      trimTapeAfterData: map["trimTapeAfterData"],
      enabledTethering: map["enabledTethering"],
      rawMode: map["rawMode"],
      workPath: map["workPath"],
      pjPaperKind: PjPaperKind.fromMap(map["pjPaperKind"]),
      useLegacyHalftoneEngine: map["useLegacyHalftoneEngine"],
      banishMargin: map["banishMargin"],
      useCopyCommandInTemplatePrint: map["useCopyCommandInTemplatePrint"]);
  info.timeout = timeout;
  return info;
}