desiredIcon method
A widget to display an icon representing whether or not the state received by the rover is the same as desired by the dashboard
Implementation
Widget desiredIcon(BoolState current, BoolState desired) {
if (current != desired) {
return const Tooltip(
message: "Waiting for relay to respond",
child: Icon(Icons.close, color: Colors.red),
);
} else {
return const Tooltip(
message: "Relay is in sync",
child: Icon(Icons.check),
);
}
}