Bluetooth class

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.Experimental: This is an experimental technologyCheck the Browser compatibility table carefully before using this in production.

The interface of the Web Bluetooth API returns a Future to a BluetoothDevice object with the specified options.

EventTarget

Bluetooth

Implemented types
Available extensions
Annotations
  • @experimental
  • @JS()
  • @staticInterop

Constructors

Bluetooth()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
onadvertisementreceived EventHandlerNonNull<Event>?

Available on BluetoothDeviceEventHandlers, provided by the PropsBluetoothDeviceEventHandlers extension

getter/setter pair
onavailabilitychanged EventHandlerNonNull<Event>?

Available on Bluetooth, provided by the PropsBluetooth extension

getter/setter pair
oncharacteristicvaluechanged EventHandlerNonNull<Event>?

Available on CharacteristicEventHandlers, provided by the PropsCharacteristicEventHandlers extension

getter/setter pair
ongattserverdisconnected EventHandlerNonNull<Event>?

Available on BluetoothDeviceEventHandlers, provided by the PropsBluetoothDeviceEventHandlers extension

getter/setter pair
onserviceadded EventHandlerNonNull<Event>?

Available on ServiceEventHandlers, provided by the PropsServiceEventHandlers extension

getter/setter pair
onservicechanged EventHandlerNonNull<Event>?

Available on ServiceEventHandlers, provided by the PropsServiceEventHandlers extension

getter/setter pair
onserviceremoved EventHandlerNonNull<Event>?

Available on ServiceEventHandlers, provided by the PropsServiceEventHandlers extension

getter/setter pair
referringDevice BluetoothDevice?

Available on Bluetooth, provided by the PropsBluetooth extension

no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

dispatchEvent(Event event) bool

Available on EventTarget, provided by the PropsEventTarget extension

getAvailability() Future<bool>

Available on Bluetooth, provided by the PropsBluetooth extension

getDevices() Future<Iterable<BluetoothDevice>>

Available on Bluetooth, provided by the PropsBluetooth extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

requestDevice([RequestDeviceOptions? options]) Future<BluetoothDevice>

Available on Bluetooth, provided by the PropsBluetooth extension

toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited