connectionState property

Stream<BleConnectionState> get connectionState

Implementation

Stream<BleConnectionState> get connectionState {
  final BleConnectionState initial = isConnected
      ? BleConnectionState.connected
      : BleConnectionState.disconnected;

  return BlePlatform.instance.connectionState
      .where((event) => event.remoteId == remoteId)
      .map((event) => event.connectionState)
      .transform(_BleInitialValueTransformer<BleConnectionState>(initial));
}