onPeripheralStateChanged property
Stream<CentralState>
onPeripheralStateChanged
Returns Stream of state.
After listening to this Stream, you'll be notified about changes in peripheral state.
Implementation
Stream<CentralState> get onPeripheralStateChanged {
_centralState ??= _stateChangedEventChannel
.receiveBroadcastStream()
.map((dynamic event) => CentralState.values[event as int]);
return _centralState!;
}