BluetoothReadException class

BluetoothReadException is a custom exception that indicates an error occurred while attempting to read the value of a Bluetooth Low Energy (BLE) characteristic. This exception is thrown when there is a failure in the BLE read operation, which can be due to reasons like connection issues, the characteristic not being readable, lack of proper permissions, or hardware malfunctions.

The message field typically contains a more detailed explanation of the error, which may include specific error codes or additional information from the BLE stack or the underlying operating system.

Example

try {
  // Code to read a BLE characteristic
} on BluetoothReadException catch (e) {
  // Handle the exception, such as by informing the user of the error
  print(e);
}
Implemented types

Constructors

BluetoothReadException(String message)
Creates a BluetoothReadException with the specified error message.

Properties

hashCode int
The hash code for this object.
no setterinherited
message String
A message describing the error that occurred during the read operation.
final
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.
override

Operators

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