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