BluetoothCharacteristic.fromProto constructor

BluetoothCharacteristic.fromProto(
  1. BluetoothCharacteristic p
)

Implementation

BluetoothCharacteristic.fromProto(protos.BluetoothCharacteristic p)
    : uuid = new Guid(p.uuid),
      deviceId = new DeviceIdentifier(p.remoteId),
      serviceUuid = new Guid(p.serviceUuid),
      secondaryServiceUuid = (p.secondaryServiceUuid.length > 0)
          ? new Guid(p.secondaryServiceUuid)
          : null,
      descriptors = p.descriptors
          .map((d) => new BluetoothDescriptor.fromProto(d))
          .toList(),
      properties = new CharacteristicProperties.fromProto(p.properties),
      _value = BehaviorSubject.seeded(p.value);