OmiDevice.fromScanResult constructor

OmiDevice.fromScanResult(
  1. dynamic scanResult
)

Implementation

factory OmiDevice.fromScanResult(dynamic scanResult) {
  return OmiDevice(
    id: scanResult.device.remoteId.str,
    name: scanResult.device.platformName,
    type: _determineDeviceType(
        scanResult.advertisementData?.serviceUuids ?? []),
    rssi: scanResult.rssi,
  );
}