FLUTTER ECOSYSTEM

canonical/upower.dart

提供一个客户端,用于连接 [UPower](https://upower.freedesktop.org/) - Linux 上执行电源管理的服务。

upower.dart 项目封面
Stars
18
Forks
8
最近推送(UTC)
2025年8月25日
项目状态
未归档
Canonical GitHub avatar
GITHUB Organization

Canonical ↗

语言Dart

此仓库发布的插件

使用的依赖

依赖清单 4 项
  • dbus^0.7.0
  • lints开发依赖^2.0.0
  • test开发依赖^1.16.8
  • test_cov开发依赖^1.0.1

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

Pub Package codecov

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();

Contributing to upower.dart

We welcome contributions! See the contribution guide for more details.