upower 0.6.1 upower: ^0.6.1 copied to clipboard
Provides a client to connect to UPower - the service that does power management on Linux.
import 'package:upower/upower.dart';
void main() async {
var client = UPowerClient();
await client.connect();
print('Running UPower ${client.daemonVersion}');
print('System state: ${client.displayDevice.state}');
print('Devices:');
for (var device in client.devices) {
print(' ${device.type} ${device.percentage}%');
}
await client.close();
}