FoundPrinter.fromJson constructor

FoundPrinter.fromJson(
  1. dynamic json
)

Implementation

factory FoundPrinter.fromJson(json)=>
    FoundPrinter(name: json["name"]??"Unknown",
      address: json["address"],
      isConnected: json["isConnected"]??false,
      type: PrinterType.values.firstWhere((element) => element.id == json["type"]),);