upower 0.7.0 copy "upower: ^0.7.0" to clipboard
upower: ^0.7.0 copied to clipboard

PlatformLinux

Provides a client to connect to UPower - the service that does power management on Linux.

example/example.dart

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();
}
8
likes
160
points
81.2k
downloads

Publisher

verified publishercanonical.com

Weekly Downloads

Provides a client to connect to UPower - the service that does power management on Linux.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MPL-2.0 (license)

Dependencies

dbus

More

Packages that depend on upower