Printer.fromJson constructor
Implementation
Printer.fromJson(Map<String, dynamic> json) {
address = json['address'];
name =
json['connectionType'] == 'BLE' ? json['platformName'] : json['name'];
connectionType = json['connectionType'] == 'BLE'
? ConnectionType.BLE
: ConnectionType.USB;
isConnected = json['isConnected'];
vendorId = json['vendorId'];
productId = json['productId'];
}