Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API to indicate when properties change or devices are added/removed. #1

Closed
robert-ancell opened this issue Sep 15, 2020 · 1 comment · Fixed by #3
Closed

Add API to indicate when properties change or devices are added/removed. #1

robert-ancell opened this issue Sep 15, 2020 · 1 comment · Fixed by #3

Comments

@robert-ancell
Copy link
Collaborator

The objects detect this, but it's not exposed over the API.

@robert-ancell
Copy link
Collaborator Author

Something like:

var client = UPowerClient();
client.connect();
await for (var name in client.displayDevice.propertyChanges) {
  if (name == 'State') {
    print (client.displayDevice.state);
  }
}

@robert-ancell robert-ancell changed the title Add API to indicate when properties change Add API to indicate when properties change or devices are added/removed. Sep 15, 2020
robert-ancell added a commit to robert-ancell/upower.dart that referenced this issue Sep 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant