bridges property

List<Bridge> get bridges

All of the bridges the user's device has access to on the network.

Throws Exception if any of the bridges do not have an IP address or an application key.

Implementation

List<Bridge> get bridges => _bridges;
set bridges (List<Bridge> bridges)

Implementation

set bridges(List<Bridge> bridges) {
  for (Bridge bridge in bridges) {
    if (bridge.ipAddress == null) {
      throw Exception("All bridges must have an IP address");
    }

    if (bridge.applicationKey == null) {
      throw Exception("All bridges must have an application key");
    }
  }

  _bridges = bridges;
}