observeConnectionState method

Stream<PeripheralConnectionState> observeConnectionState({
  1. bool emitCurrentValue = false,
  2. bool completeOnDisconnect = false,
})

Returns a stream of PeripheralConnectionState.

By default this stream will never end, but this behaviour can be changed by setting completeOnDisconnect to true.

Implementation

Stream<PeripheralConnectionState> observeConnectionState(
        {bool emitCurrentValue = false, bool completeOnDisconnect = false}) =>
    _manager.observePeripheralConnectionState(
        identifier, emitCurrentValue, completeOnDisconnect);