searchForSpecificNode method

Future<DiscoveredDevice?> searchForSpecificNode(
  1. String deviceNameOrId, {
  2. bool isProxy = false,
  3. Duration timeoutDuration = kDefaultScanDuration,
})

Will scan for the given device using name or id (MAC on Android or UUID on iOS).

It will scan by default for unprovisioned nodes, but one can switch to proxy candidates using the isProxy bool flag.

Returns a DiscoveredDevice or null if not found after timeoutDuration (defaults to 5sec).

Throws an UnsupportedError if the current OS is not supported.

Implementation

Future<DiscoveredDevice?> searchForSpecificNode(
  String deviceNameOrId, {
  bool isProxy = false,
  Duration timeoutDuration = kDefaultScanDuration,
}) =>
    _bleScanner.searchForSpecificNode(deviceNameOrId, timeoutDuration, isProxy);