startScan static method

Future<void> startScan({
  1. List<Guid> withServices = const [],
  2. Duration? timeout,
  3. Duration? removeIfGone,
  4. bool oneByOne = false,
  5. bool androidUsesFineLocation = false,
})

Implementation

static Future<void> startScan({
  List<Guid> withServices = const [],
  Duration? timeout,
  Duration? removeIfGone,
  bool oneByOne = false,
  bool androidUsesFineLocation = false,
}) async {
  if (Platform.isWindows) {
    return await FlutterBluePlusWindows.startScan(
      withServices: withServices,
      timeout: timeout,
      removeIfGone: removeIfGone,
      oneByOne: oneByOne,
      androidUsesFineLocation: androidUsesFineLocation,
    );
  }

  return await Mobile.FlutterBluePlus.startScan(
    withServices: withServices,
    timeout: timeout,
    removeIfGone: removeIfGone,
    oneByOne: oneByOne,
    androidUsesFineLocation: androidUsesFineLocation,
  );
}