isNotifying property
bool
get
isNotifying
return true if we're subscribed to this characteristic
- you can subscribe using setNotifyValue(true)
Implementation
bool get isNotifying {
var cccd = descriptors._firstWhereOrNull(
(d) => d.descriptorUuid == cccdUuid && d.instanceId == instanceId,
);
if (cccd == null) {
return false;
}
var hasNotify = cccd.lastValue.isNotEmpty && (cccd.lastValue[0] & 0x01) > 0;
var hasIndicate = cccd.lastValue.isNotEmpty && (cccd.lastValue[0] & 0x02) > 0;
return hasNotify || hasIndicate;
}