subscribe method
Subscribes to this characteristic.
Implementation
Future<void> subscribe({Duration? timeout, String? queueId}) {
if (!isSupported) throw Exception('Operation not supported');
if (_property == CharacteristicProperty.indicate) {
return BleShieldNative.subscribeIndications(
_characteristic._metaData.deviceId,
_characteristic._metaData.serviceId,
_characteristic.uuid,
timeout: timeout,
queueId: queueId,
);
}
return BleShieldNative.subscribeNotifications(
_characteristic._metaData.deviceId,
_characteristic._metaData.serviceId,
_characteristic.uuid,
timeout: timeout,
queueId: queueId,
);
}