code property

String? code

Retrieves the code corresponding to the characteristic property.

The code is used internally by Faketooth for configuration and communication. Returns null if the characteristic property is not recognized.

Implementation

String? get code {
  switch (this) {
    case FaketoothCharacteristicProperties.broadcast                  : return "broadcast";
    case FaketoothCharacteristicProperties.read                       : return "read";
    case FaketoothCharacteristicProperties.writeWithoutResponse       : return "writeWithoutResponse";
    case FaketoothCharacteristicProperties.write                      : return "write";
    case FaketoothCharacteristicProperties.notify                     : return "notify";
    case FaketoothCharacteristicProperties.indicate                   : return "indicate";
    case FaketoothCharacteristicProperties.authenticatedSignedWrites  : return "authenticatedSignedWrites";
    case FaketoothCharacteristicProperties.extendedProperties         : return "extendedProperties";
    case FaketoothCharacteristicProperties.notifyEncryptionRequired   : return "notifyEncryptionRequired";
    case FaketoothCharacteristicProperties.indicateEncryptionRequired : return "indicateEncryptionRequired";
    default: return null;
  }
}