shutdown method
Shuts down the Liquid Galaxy system.
Implementation
Future<void> shutdown() async {
final pw = _sshData.passwordOrKey;
final result = await getScreenAmount();
if (result != null) {
screenAmount = int.parse(result);
}
for (var i = screenAmount; i >= 1; i--) {
try {
await _sshData.execute(
'sshpass -p $pw ssh -t lg$i "echo $pw | sudo -S poweroff"');
} catch (e) {
// ignore: avoid_print
print(e);
}
}
}