startScan static method

Future<void> startScan({
  1. ScanFilter? scanFilter,
  2. PlatformConfig? platformConfig,
})

Start scan. Scan results will arrive in onScanResult listener. It might throw errors if Bluetooth is not available. webRequestOptions is supported on Web only.

Implementation

static Future<void> startScan({
  ScanFilter? scanFilter,
  PlatformConfig? platformConfig,
}) async {
  return await _bleCommandQueue.queueCommandWithoutTimeout(
    () => _platform.startScan(
      scanFilter: scanFilter,
      platformConfig: platformConfig,
    ),
  );
}