onDisconnect method

void onDisconnect(
  1. Device device
)

Notifies the user when a device has disconnected.

Implementation

void onDisconnect(Device device) {
  models.home.setMessage(severity: Severity.critical, text: "The ${device.humanName} has disconnected");
  if (device == Device.SUBSYSTEMS) models.rover.status.value = RoverStatus.DISCONNECTED;
  if (device == Device.VIDEO) models.video.reset();
  notifyListeners();
}