v0.7.0
upower
Linux 上で電源管理を実行するサービスである UPower に接続するためのクライアントを提供します。
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.