Skip to content
pubscout

dbus

0.8.1, released yesterday by canonical.com

Native Dart D-Bus client for Linux and Windows.

$ flutter pub add dbus
Source repository

What it does

Provides a pure Dart implementation of the D-Bus message bus client, allowing Dart applications to access services on the Linux desktop or Windows via FFI. It supports code generation from XML interface definitions and direct API usage.

AI-written summary of version 0.8.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Accessing Linux desktop services via D-Bus
  • Building D-Bus clients in Dart
  • Generating Dart bindings from D-Bus XML interfaces

Skip it when

  • Running on macOS or other non-Linux/Windows platforms
  • When you only need a simple HTTP or WebSocket client

Strengths

  • Native performance through FFI
  • Supports code generation for clean APIs
  • Cross-platform support for Linux and Windows

Weaknesses

  • Only works on Linux and Windows
  • Requires native FFI setup
  • No support for macOS or other platforms

Setup

Kind
FFI (native library)
Effort
Medium
Code generation
No
Direct dependencies
4

Add dependency, ensure libdbus (Linux) or equivalent on Windows is available, no build_runner needed.

import 'package:dbus/dbus.dart';

Future<void> main() async {
  var client = DBusClient.session();
  var object = DBusRemoteObject(client, name: 'com.example.Test', path: DBusObjectPath('/com/example/Test/Object'));
  var version = await object.getProperty('com.example.Test', 'Version', signature: DBusSignature('s')).then((v)=>v.asString());
  print('version: $version');
  await client.close();
}

Alternatives

Packages that do the same job and could replace dbus.

  • cronet_http

    An Android Flutter plugin providing access to the Cronet HTTP client.

  • stream_chat

    Low‑level Dart client for Stream Chat API

  • bonsoir

    A Zeroconf library to discover network services and broadcast your own.

  • aws_client

    Strongly-typed Dart client libraries for accessing Amazon Web Services (AWS) APIs.

Works with

Packages commonly used together with dbus: ones it builds on, ones built on it, and its own family.