portDiscovery static method

Future<List<PortInfo>> portDiscovery(
  1. StarPortType portType
)

Scan for available printers. Have specify StarPortType of the printer

Implementation

static Future<List<PortInfo>> portDiscovery(StarPortType portType) async {
  dynamic result =
      await _channel.invokeMethod('portDiscovery', {'type': portType.text});
  if (result is List) {
    return result.map<PortInfo>((port) {
      return PortInfo(port);
    }).toList();
  } else {
    return [];
  }
}