IBleDevice class abstract
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
connect(
{Duration duration = const Duration(seconds: 2), bool autoConnect = false}) → Future< IBleDevice> - Connect to the Device
-
disableCharacteristicIndicate(
{required String serviceUuid, required String charUuid}) → Future< bool> - Tries to disable the specified characteristic to indicate. @param serviceUuid UUID of the service the characteristic belongs to. @param charUuid UUID of the characteristic to enable notify for.
-
disableCharacteristicNotify(
{required String serviceUuid, required String charUuid}) → Future< bool> - Tries to disable the specified characteristic notify. @param serviceUuid UUID of the service the characteristic belongs to. @param charUuid UUID of the characteristic to enable notify for.
-
disconnect(
) → Future< IBleDevice> - Disconnect from the Device
-
discoverServices(
{bool refresh = false}) → Future< void> - Discover the available services in the BLE device.
-
enableCharacteristicIndicate(
{required String serviceUuid, required String charUuid}) → Future< bool> - Tries to enable the specified characteristic to indicate. @param serviceUuid UUID of the service the characteristic belongs to. @param charUuid UUID of the characteristic to enable notify for.
-
enableCharacteristicNotify(
{required String serviceUuid, required String charUuid}) → Future< bool> - Tries to enable the specified characteristic notify. @param serviceUuid UUID of the service the characteristic belongs to. @param charUuid UUID of the characteristic to enable notify for.
-
getConnectionState(
) → BleConnectionState - Returns the connection state for this device. @return connection state for the device, or BleConnectionState.UNKNOWN if state cannot be detected.
-
getConnectionStates(
) → Stream< BleConnectionState> - Returns stream to listen for changes in connection states.
-
getId(
) → String - Returns the ID of the device.
-
getName(
) → String - Returns the device name.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readCharacteristic(
{required String serviceUuid, required String charUuid}) → Future< IBluetoothGattCharacteristic> - Reads a the specified chracteristic from the service @param serviceUuid 128 bit UUID of the service @param charUuid 128 bit UUID of the characteristic
-
reconnect(
) → Future< IBleDevice> - Tries to reconnect the device.
-
setOnCharacteristicChangeListener(
{IBleCharacteristicChangeListener? listener}) → void - Sets a listener to be notified when a characteristic changes. @param listener to be called when a characteristic changes.
-
setOnDeviceConnectionsStateChangeListener(
{IBleDeviceConnectionStateChangeListener? listener}) → void - Sets the listener to be notified when the connection state of the device changes. @param listener to be called when the connection state changes.
-
toString(
) → String -
A string representation of this object.
inherited
-
writeCharacteristic(
{required String serviceUuid, required String charUuid, required Uint8List value}) → Future< IBluetoothGattCharacteristic> - Writes the value to the specified characteristic of the given service. @param serviceUuid 128 bit UUID of the service @param charUuid 128 bit UUID of the characteristic @param value bytes of the value to write
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited