monitor method

Stream<Uint8List> monitor({
  1. String? transactionId,
})

Returns a Stream of notifications/indications emitted by this characteristic.

Library chooses notifications over indications, if both are supported.

Subscribing to the returned object enables the notifications/indications on the peripheral. Cancelling the last subscription disables the notifications/indications on this characteristic.

Implementation

Stream<Uint8List> monitor({String? transactionId}) =>
    _manager.monitorCharacteristicForIdentifier(
      service.peripheral,
      this,
      transactionId ?? TransactionIdGenerator.getNextId(),
    );