BluetoothService class
A Bluetooth low energy service. this can be primary or secondary. A service contains one or more BluetoothCharacteristics.
See BluetoothDefaultServiceUUIDS for a list of default UUIDS provided in the Bluetooth low energy specification.
You get get a BluetoothService by calling BluetoothDevice.discoverServices or getting them from the BluetoothDevice.services stream.
Constructors
- BluetoothService(WebBluetoothRemoteGATTService _bluetoothService)
- A constructor for a new service.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasIncludedService → bool
-
Check to see if the getIncludedService method exists for this service.
no setter
- isPrimary → bool
-
Check to see if the service is a primary service (top level).
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uuid → String
-
The uuid of the service
no setter
Methods
-
getCharacteristic(
String uuid) → Future< BluetoothCharacteristic> - Get a characteristic from this service.
-
getCharacteristics(
{String? uuid}) → Future< List< BluetoothCharacteristic> > - Get a list of characteristics from this service.
-
getIncludedService(
String uuid) → Future< BluetoothService> - Get an included service (secondary) service form this service.
-
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