Printer.fromJson constructor

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

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'];
}