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
No data recieved from subscribeSignal method. #107
Comments
Looking at the UPower D-Bus interface using D-Feet shows it doesn't have a With the following code I can monitor state changes as I connect and disconnect the power on my laptop. Hope this helps! var client = DBusClient.system();
var object = DBusRemoteObject(client, 'org.freedesktop.UPower', DBusObjectPath('/org/freedesktop/UPower/devices/DisplayDevice'));
var state = await object.getProperty('org.freedesktop.UPower.Device', 'State');
print ('state: ${state}');
var stream = object.subscribePropertiesChanged();
await for (var signal in stream) {
var state = signal.changedProperties['State'];
if (state != null) {
print ('state: ${state}');
}
} |
This might help! https://pub.dev/packages/upower |
That's great. Thank you for this plugin. I made a PR with the help of your code here . Thank you for your help :). |
@yash1200 see canonical/upower.dart#3 for monitoring the state (see example/monitor-state.dart). |
That's great. Till when can we expect the stable release of these plugins ? |
I don't have a schedule for a stable release, but I'm looking at:
|
With the help of
example/signal.dart
, I was able to write this function but still no value is being recieved from it.The text was updated successfully, but these errors were encountered: