connectionStreamOf static method

Stream<bool> connectionStreamOf(
  1. String address
)

to get connection update for a specific device

Implementation

static Stream<bool> connectionStreamOf(String address) =>
    _connectionStreamController.stream
        .where((event) => event["device"] == address)
        .map((event) => event["connected"]);