v0.7.0
upower
提供一個客戶端以連接到 UPower - 在 Linux 上執行電源管理的服務。
8喜歡 21.7萬近 30 天下載160Pub 分數
Linux
提供一個客戶端,用於連接到 [UPower](https://upower.freedesktop.org/) - 在 Linux 上執行電源管理的服務。
以下為英文專案原文快照,最新內容請造訪 GitHub。
Provides a client to connect to UPower - the service that does power management on Linux.
import 'package:upower/upower.dart';
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();
We welcome contributions! See the contribution guide for more details.