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.