DBusClientProxy.system constructor

DBusClientProxy.system({
  1. bool introspectable = true,
})

Creates a new DBus client to communicate with the system bus.

Implementation

factory DBusClientProxy.system({bool introspectable = true}) {
  if (kIsWeb) {
    // In fact, we will not use this dbus client anywhere in the web,
    // just workaround to pass an exception when call DBusClient.system()
    // or DBusClient.session() in web platform
    return DBusClientProxy(
      DBusAddress('unix:path=/system'),
      introspectable: introspectable,
    );
  }

  return DBusClient.system(introspectable: introspectable) as DBusClientProxy;
}