GATTDescriptor.immutable constructor

GATTDescriptor.immutable({
  1. required UUID uuid,
  2. required Uint8List value,
})

Creates a immutable descriptor with a specified value.

uuid A 128-bit UUID that identifies the characteristic. You must use only one of the two currently supported descriptor types: CBUUIDCharacteristicUserDescriptionString or CBUUIDCharacteristicFormatString. For more details about these descriptor types, see CBUUID.

value The descriptor value to cache. You must provide a non-nil value. Once published, you can’t update the value dynamically.

Implementation

factory GATTDescriptor.immutable({
  required UUID uuid,
  required Uint8List value,
}) =>
    ImmutableGATTDescriptor(
      uuid: uuid,
      value: value,
    );