ubuntu_session 0.0.1 ubuntu_session: ^0.0.1 copied to clipboard
Native Dart client library to access the GNOME Session Manager
import 'package:dbus/dbus.dart';
import 'package:ubuntu_session/ubuntu_session.dart';
void main() async {
final manager = SessionManager();
await manager.connect();
try {
await manager.reboot();
} on DBusMethodResponseException catch (e) {
print('Error: $e');
}
await manager.close();
}