Characteristic class
Representation of a single GATT Characteristic nested inside a Service.
It contains a single value and any number of Descriptors describing that value. The properties of a characteristic determine how you can use a characteristic’s value, and how you access the descriptors.
- Implementers
Constructors
-
Characteristic.fromJson(Map<
String, dynamic> jsonObject, Service service, ManagerForCharacteristic manager)
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isIndicatable ↔ bool
-
True if this characteristic can be monitored via indications.
getter/setter pair
- isNotifiable ↔ bool
-
True if this characteristic can be monitored via notifications.
getter/setter pair
- isReadable ↔ bool
-
True if this characteristic can be read.
getter/setter pair
- isWritableWithoutResponse ↔ bool
-
True if this characteristic can be written without resposne.
getter/setter pair
- isWritableWithResponse ↔ bool
-
True if this characteristic can be written with resposne.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- service → Service
-
The Service containing this characteristic.
final
- uuid ↔ String
-
The UUID of this characteristic.
getter/setter pair
Methods
-
descriptors(
) → Future< List< Descriptor> > - Returns a list of Descriptors of this characteristic.
-
monitor(
{String? transactionId}) → Stream< Uint8List> - Returns a Stream of notifications/indications emitted by this characteristic.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
{String? transactionId}) → Future< Uint8List> - Reads the value of this characteristic.
-
readDescriptor(
String descriptorUuid, {String? transactionId}) → Future< DescriptorWithValue> -
Reads the value of a Descriptor identified by
descriptorUuid
. -
toString(
) → String -
Returns a string representation of this characteristic in a format that
contains all its properties and Service.
override
-
write(
Uint8List value, bool withResponse, {String? transactionId}) → Future< void> - Writes to the value of this characteristic.
-
writeDescriptor(
String descriptorUuid, Uint8List value, {String? transactionId}) → Future< Descriptor> -
Writes the
value
of a Descriptor identified bydescriptorUuid
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override