hasRequestLEScan static method

bool hasRequestLEScan()

Check to see if the current browser has the requestLEScan method.

Use this to avoid the NativeAPINotImplementedError.

Implementation

static bool hasRequestLEScan() {
  if (!isBluetoothAPISupported()) {
    return false;
  }
  final bluetooth = _JSUtil.getProperty(_getNavigator(), "bluetooth");
  final hasProperty = _JSUtil.hasProperty(bluetooth, "requestLEScan");
  return hasProperty;
}