getAvailablePorts static method

Future<List<SerialPortInfo>> getAvailablePorts()

Zwraca listę dostępnych portów szeregowych

Implementation

static Future<List<SerialPortInfo>> getAvailablePorts() async {
  if (Platform.isWindows) {
    return _scanWindows();
  } else if (Platform.isLinux) {
    return _scanLinux();
  } else if (Platform.isMacOS) {
    return _scanMacOS();
  }
  return [];
}