BluetoothLEScanOptions class
The js object for request options. This is used for Bluetooth.requestLEScan.
Either filters or acceptAllAdvertisements must have something meaningful set
in them, they can't be set at the same time.
If for example acceptAllAdvertisements is true
and filters is not an empty
list. Then an Error will be thrown when trying to request devices.
https://webbluetoothcg.github.io/web-bluetooth/scanning.html#dictdef-bluetoothlescanoptions
- Annotations
-
- @JS()
- @anonymous
Constructors
-
BluetoothLEScanOptions({List<
BluetoothScanFilter> filters, bool keepRepeatedDevices, bool acceptAllAdvertisements}) -
A constructor for Bluetooth LE scan options.
factory
Properties
- acceptAllAdvertisements → bool
-
If all advertisements should be received.
no setter
-
filters
→ List<
BluetoothScanFilter> -
A list of filters that the accepted device must meet.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- keepRepeatedDevices → bool
-
Normally scans will discard the second and subsequent advertisements from
a single device to save power. If you need to receive them, set
keepRepeatedDevices to
true
. Note that setting keepRepeatedDevices tofalse
doesn't guarantee you won’t get redundant events; It just allows the UA to save power by omitting them.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited