Native Dart client library for DBus

Related tags

Desktop dbus.dart
Overview

Pub Package codecov

A native Dart client implementation of D-Bus.

Accessing a remote object using dart-dbus

The easiest way to get started is to use dart-dbus to generate Dart objects to access existing D-Bus services. Start with a D-Bus interface definition:

<node name="/org/freedesktop/hostname1">
  <interface name="org.freedesktop.hostname1">
    <property name="Hostname" type="s" access="read"/>
  </interface>
</node>

The dart-dbus tool processes this interface to generate a Dart source file:

$ dart-dbus generate-remote-object hostname1.xml -o hostname1.dart

You can then use the generated hostname1.dart to access that remote object:

import 'package:dbus/dbus.dart';
import 'hostname1.dart';

var client = DBusClient.system();
var hostname1 = OrgFreeDesktopHostname1(client, 'org.freedesktop.hostname1');
var hostname = await hostname1.getHostname();
print('hostname: $hostname')
await client.close();

The code generated by dart-dbus may not be the cleanest API you want to expose for your service. It is recommended that you use the generated code as a starting point and then modify it as necessary.

Accessing a remote object manually

You can access remote objects without using dart-dbus if you want. This requires you to handle error cases yourself. The equivalent of the above example is:

import 'package:dbus/dbus.dart';

var client = DBusClient.system();
var object = DBusRemoteObject(client, destination: 'org.freedesktop.hostname1', path: DBusObjectPath('/org/freedesktop/hostname1'));
var hostname = await object.getProperty('org.freedesktop.hostname1', 'Hostname');
print('hostname: ${hostname.toNative()}');
await client.close();

Exporting an object on the bus

import 'package:dbus/dbus.dart';

class TestObject extends DBusObject {
  @override
  DBusObjectPath get path {
    return DBusObjectPath('/com/example/Test');
  }

  @override
  Future<MethodResponse> handleMethodCall(DBusMethodCall methodCall) async {
    if (methodCall.interface == 'com.example.Test') {
      if (methodCall.name == 'Test') {
        return DBusMethodSuccessResponse([DBusString('Hello World!')]);
      } else {
        return DBusMethodErrorResponse.unknownMethod();
      }
    } else {
      return DBusMethodErrorResponse.unknownInterface();
    }
  }
}

var client = DBusClient.session();
await client.registerObject(TestObject());

Contributing to dbus.dart

We welcome contributions! See the contribution guide for more details.

Comments
  • Added required name and path attributes to generated remote object constructor

    Added required name and path attributes to generated remote object constructor

    Right now compilations are failing for any examples on dbus: ^0.6.3 because the remote object constructor has made name and path a required named attribute.

    opened by Taha-Firoz 13
  • [Flatpak] Don't use a hard link to system_bus_socket. Is it possible?

    [Flatpak] Don't use a hard link to system_bus_socket. Is it possible?

    By default, Flatpak apps are isolated from the system bus, the usual option is to explicitly specify the required DBus interface (for example, org.freedesktop.Notifications). All calls on this interface are proxied using xdg-dbus-proxy.

    The problem is that in the case of the dbus package (DBusClient.system()), it's impossible to proxy the system bus in this way, because the system socket path is actually used. Since by default Flatpak apps are isolated from the filesystem and the system bus, we get this exception:

    flutter: SocketException: Connection failed (OS Error: No such file or directory, errno = 2), address = /run/dbus/system_bus_socket, port = 0

    The only solution is to allow access to the system socket (option --socket=system-bus when building the package), but the Flatpak convention considers this permission dangerous https://docs.flatpak.org/en/latest/sandbox-permissions.html#d-bus-access.

    I can't say for sure if a portable way to specify the system bus socket is possible (as in the case of a session socket using XDG paths), but it would be very useful. Or does this require replacing DBusClient.system() with DBusClient.session() in plugins that use it?

    opened by proninyaroslav 10
  • Signal Streams aren't broadcast by default

    Signal Streams aren't broadcast by default

    Signals streams aren't generated as broadcast by default, this causes a runtime error when the stream is listened to again after a widget is destroyed and rebuilt.

    This is the code that gets generated as of now, but it crashes if a widget is rebuilt and the stream is listened to again

    somesignal = DBusRemoteObjectSignalStream(
                object: this,
                interface: 'com.foo.bar',
                name: 'somesignal',
                signature: DBusSignature('a(ss)'))
            .map((signal) =>
                OrgFreedesktopDBusIntrospectablesomesignal(signal));
    

    The crashing doesn't occur here since the stream is now built as a broadcast stream and can be listened to multiple times.

    somesignal = DBusRemoteObjectSignalStream(
                object: this,
                interface: 'com.foo.bar',
                name: 'somesignal',
                signature: DBusSignature('a(ss)'))
            .asBroadcastStream()
            .map((signal) =>
                OrgFreedesktopDBusIntrospectablesomesignal(signal));
    
    opened by Taha-Firoz 9
  • Timeout Exception on Bus Reply.

    Timeout Exception on Bus Reply.

    Hi

    I've been recently bitten by an update in DBus, as now it seems that syncronous DBus calls receive a Timeout from the server, in about 5 seconds.

    The problem happens on Ubuntu 20.04 LTS, with a default install of flutter and dbus 0.5.x. This issue did not happen on dbus 0.3.x

    I receive the following unexpected exception from the server:

    org.freedesktop.Avahi.TimeoutError: TimeoutReached

    As I traced back into my code, this happens when calling the method org.freedesktop.Avahi.Server.ResolveService using the avahi service files. The stack trace is the following:

    00:15 +0: external_api Able to create a discovery without D-Bus complaining    
    Enabling workaround for V1 API with the 100ms wait behavior. Update your Avahi version to 0.8 or later if you want this warning to disappear.
    00:17 +3: end-to-end Broadcast name and receive them on service enumeration    
    Enabling workaround for V1 API with the 100ms wait behavior. Update your Avahi version to 0.8 or later if you want this warning to disappear.
    Cached service received: AvahiServiceBrowserItemNew(path: 'DBusObjectPath('/Client57/ServiceBrowser1')',interface: '2',protocol: 'AvahiProtocol.AVAHI_PROTO_INET6', name: 'ItemNew',type: '_bonsoire2e._tcp',domain: 'local'
    DBG: AvahiServiceBrowserItemNew(path: 'DBusObjectPath('/Client57/ServiceBrowser1')',interface: '2',protocol: 'AvahiProtocol.AVAHI_PROTO_INET6', name: 'ItemNew',type: '_bonsoire2e._tcp',domain: 'local'
    Item added! AvahiServiceBrowserItemNew(path: 'DBusObjectPath('/Client57/ServiceBrowser1')',interface: '2',protocol: 'AvahiProtocol.AVAHI_PROTO_INET6', name: 'ItemNew',type: '_bonsoire2e._tcp',domain: 'local'
    DBG: AvahiServiceBrowserItemNew(path: 'DBusObjectPath('/Client57/ServiceBrowser1')',interface: '2',protocol: 'AvahiProtocol.AVAHI_PROTO_INET6', name: 'ItemNew',type: '_bonsoire2e._tcp',domain: 'local'
    Cached service received: AvahiServiceBrowserItemNew(path: 'DBusObjectPath('/Client57/ServiceBrowser1')',interface: '2',protocol: 'AvahiProtocol.AVAHI_PROTO_INET', name: 'ItemNew',type: '_bonsoire2e._tcp',domain: 'local'
    DBG: AvahiServiceBrowserItemNew(path: 'DBusObjectPath('/Client57/ServiceBrowser1')',interface: '2',protocol: 'AvahiProtocol.AVAHI_PROTO_INET', name: 'ItemNew',type: '_bonsoire2e._tcp',domain: 'local'
    Item added! AvahiServiceBrowserItemNew(path: 'DBusObjectPath('/Client57/ServiceBrowser1')',interface: '2',protocol: 'AvahiProtocol.AVAHI_PROTO_INET', name: 'ItemNew',type: '_bonsoire2e._tcp',domain: 'local'
    DBG: AvahiServiceBrowserItemNew(path: 'DBusObjectPath('/Client57/ServiceBrowser1')',interface: '2',protocol: 'AvahiProtocol.AVAHI_PROTO_INET', name: 'ItemNew',type: '_bonsoire2e._tcp',domain: 'local'
    Cached service received: AvahiServiceBrowserItemNew(path: 'DBusObjectPath('/Client57/ServiceBrowser1')',interface: '1',protocol: 'AvahiProtocol.AVAHI_PROTO_INET', name: 'ItemNew',type: '_bonsoire2e._tcp',domain: 'local'
    DBG: AvahiServiceBrowserItemNew(path: 'DBusObjectPath('/Client57/ServiceBrowser1')',interface: '1',protocol: 'AvahiProtocol.AVAHI_PROTO_INET', name: 'ItemNew',type: '_bonsoire2e._tcp',domain: 'local'
    Item added! AvahiServiceBrowserItemNew(path: 'DBusObjectPath('/Client57/ServiceBrowser1')',interface: '1',protocol: 'AvahiProtocol.AVAHI_PROTO_INET', name: 'ItemNew',type: '_bonsoire2e._tcp',domain: 'local'
    DBG: AvahiServiceBrowserItemNew(path: 'DBusObjectPath('/Client57/ServiceBrowser1')',interface: '1',protocol: 'AvahiProtocol.AVAHI_PROTO_INET', name: 'ItemNew',type: '_bonsoire2e._tcp',domain: 'local'
    00:22 +3 -1: end-to-end Broadcast name and receive them on service enumeration [E]
      org.freedesktop.Avahi.TimeoutError: Timeout reached
      package:dbus/src/dbus_client.dart 1067:7                                DBusClient._callMethod
      ===== asynchronous gap ===========================
      dart:async                                                              _asyncErrorWrapperHelper
      package:bonsoir_linux_dbus/src/linux_dbus_bonsoir_discovery.dart 49:13  LinuxDBusBonsoirDiscovery.ready.<fn>
      ===== asynchronous gap ===========================
      dart:async                                                              _StreamImpl.listen
      package:dbus/src/dbus_client.dart 126:31                                DBusSignalStream.listen
      package:bonsoir_linux_dbus/src/linux_dbus_bonsoir_discovery.dart 39:12  LinuxDBusBonsoirDiscovery.ready
      ===== asynchronous gap ===========================
      dart:async                                                              _asyncThenWrapperHelper
      test/bonsoir_linux_dbus_test.dart 70:48                                 main.<fn>.<fn>
      test/bonsoir_linux_dbus_test.dart 61:68                                 main.<fn>.<fn>
      
      org.freedesktop.Avahi.TimeoutError: Timeout reached
      package:dbus/src/dbus_client.dart 1067:7                                DBusClient._callMethod
      ===== asynchronous gap ===========================
      dart:async                                                              _asyncErrorWrapperHelper
      package:bonsoir_linux_dbus/src/linux_dbus_bonsoir_discovery.dart 84:7   LinuxDBusBonsoirDiscovery.start.<fn>
      package:bonsoir_linux_dbus/src/linux_dbus_bonsoir_discovery.dart 76:57  LinuxDBusBonsoirDiscovery.start.<fn>
      ===== asynchronous gap ===========================
      dart:async                                                              _ForwardingStream.listen
      package:bonsoir_linux_dbus/src/linux_dbus_bonsoir_discovery.dart 76:50  LinuxDBusBonsoirDiscovery.start
      test/bonsoir_linux_dbus_test.dart 121:50                                main.<fn>.<fn>
      ===== asynchronous gap ===========================
      dart:async                                                              _asyncThenWrapperHelper
      test/bonsoir_linux_dbus_test.dart                                       main.<fn>.<fn>
      
      org.freedesktop.Avahi.TimeoutError: Timeout reached
      package:dbus/src/dbus_client.dart 1067:7                                DBusClient._callMethod
      ===== asynchronous gap ===========================
      dart:async                                                              _asyncErrorWrapperHelper
      package:bonsoir_linux_dbus/src/linux_dbus_bonsoir_discovery.dart 49:13  LinuxDBusBonsoirDiscovery.ready.<fn>
      ===== asynchronous gap ===========================
      dart:async                                                              _StreamImpl.listen
      package:dbus/src/dbus_client.dart 126:31                                DBusSignalStream.listen
      package:bonsoir_linux_dbus/src/linux_dbus_bonsoir_discovery.dart 39:12  LinuxDBusBonsoirDiscovery.ready
      ===== asynchronous gap ===========================
      dart:async                                                              _asyncThenWrapperHelper
      test/bonsoir_linux_dbus_test.dart 70:48                                 main.<fn>.<fn>
      test/bonsoir_linux_dbus_test.dart 61:68                                 main.<fn>.<fn>
      
      org.freedesktop.Avahi.TimeoutError: Timeout reached
      package:dbus/src/dbus_client.dart 1067:7                                DBusClient._callMethod
      ===== asynchronous gap ===========================
      dart:async                                                              _asyncErrorWrapperHelper
      package:bonsoir_linux_dbus/src/linux_dbus_bonsoir_discovery.dart 84:7   LinuxDBusBonsoirDiscovery.start.<fn>
      package:bonsoir_linux_dbus/src/linux_dbus_bonsoir_discovery.dart 76:57  LinuxDBusBonsoirDiscovery.start.<fn>
      ===== asynchronous gap ===========================
      dart:async                                                              _ForwardingStream.listen
      package:bonsoir_linux_dbus/src/linux_dbus_bonsoir_discovery.dart 76:50  LinuxDBusBonsoirDiscovery.start
      test/bonsoir_linux_dbus_test.dart 121:50                                main.<fn>.<fn>
      ===== asynchronous gap ===========================
      dart:async                                                              _asyncThenWrapperHelper
      test/bonsoir_linux_dbus_test.dart                                       main.<fn>.<fn>
      
      org.freedesktop.Avahi.TimeoutError: Timeout reached
      package:dbus/src/dbus_client.dart 1067:7                                DBusClient._callMethod
      ===== asynchronous gap ===========================
      dart:async                                                              _asyncErrorWrapperHelper
      package:bonsoir_linux_dbus/src/linux_dbus_bonsoir_discovery.dart 49:13  LinuxDBusBonsoirDiscovery.ready.<fn>
      ===== asynchronous gap ===========================
      dart:async                                                              _StreamImpl.listen
      package:dbus/src/dbus_client.dart 126:31                                DBusSignalStream.listen
      package:bonsoir_linux_dbus/src/linux_dbus_bonsoir_discovery.dart 39:12  LinuxDBusBonsoirDiscovery.ready
      ===== asynchronous gap ===========================
      dart:async                                                              _asyncThenWrapperHelper
      test/bonsoir_linux_dbus_test.dart 70:48                                 main.<fn>.<fn>
      test/bonsoir_linux_dbus_test.dart 61:68                                 main.<fn>.<fn>
      
      org.freedesktop.Avahi.TimeoutError: Timeout reached
      package:dbus/src/dbus_client.dart 1067:7                                DBusClient._callMethod
      ===== asynchronous gap ===========================
      dart:async                                                              _asyncErrorWrapperHelper
      package:bonsoir_linux_dbus/src/linux_dbus_bonsoir_discovery.dart 84:7   LinuxDBusBonsoirDiscovery.start.<fn>
      package:bonsoir_linux_dbus/src/linux_dbus_bonsoir_discovery.dart 76:57  LinuxDBusBonsoirDiscovery.start.<fn>
      ===== asynchronous gap ===========================
      dart:async                                                              _ForwardingStream.listen
      package:bonsoir_linux_dbus/src/linux_dbus_bonsoir_discovery.dart 76:50  LinuxDBusBonsoirDiscovery.start
      test/bonsoir_linux_dbus_test.dart 121:50                                main.<fn>.<fn>
      ===== asynchronous gap ===========================
      dart:async                                                              _asyncThenWrapperHelper
      test/bonsoir_linux_dbus_test.dart                                       main.<fn>.<fn>
      
    00:23 +3 -1: Some tests failed.

    My test file and entire source code is public at https://github.com/Piero512/bonsoir_linux_dbus

    It seems like DBus is missing a timeout parameter for the method call and now that it parses the error messages correctly, this happens.

    opened by Piero512 8
  • Drop dependency on deprecated pedantic plugin

    Drop dependency on deprecated pedantic plugin

    Pedantic is deprecated upstream. Drop support and switch to equivalent lints package with appropriate configuration to match pedantic's default rule set.

    opened by diddledani 6
  • No data recieved from subscribeSignal method.

    No data recieved from subscribeSignal method.

    With the help of example/signal.dart, I was able to write this function but still no value is being recieved from it.

    var client = DBusClient.system();
    var object = DBusRemoteObject(
      client,
      'org.freedesktop.UPower',
      DBusObjectPath('/org/freedesktop/UPower/devices/DisplayDevice'),
    );
    var stream = object.subscribeSignal('org.freedesktop.UPower.Device', 'State');
    await for (var signal in stream) {
      var state = (signal.values[0] as DBusUint64).value;
      print('State is : $state!');
    }
    
    opened by yash1200 6
  • Unknown DBus data type on Flutter

    Unknown DBus data type on Flutter

    Hi!

    I was trying to interface with the NetworkManger via dbus to provide linux implementation for the flutter connectivity plugin. The source code can be found here. https://github.com/fluttercommunity/firebase_dart_sdk/blob/1dc2373b9524b8a429d6bad32a127eb497fc7b0f/connectivity_linux/lib/connectivity_linux.dart#L81

    Note: This only happens when I run the flutter app. When I run it as a simple dart app everything worked well.

    Thank you.

    Distributor ID:	Ubuntu
    Description:	Ubuntu 18.04.5 LTS
    Release:	18.04
    Codename:	bionic
    
    Launching lib/main.dart on Linux in debug mode...
    Building Linux application...
    Waiting for Linux to report its views...
    Debug service listening on ws://127.0.0.1:46223/qySq3Oyb90M=/ws
    Syncing files to device Linux...
    [ERROR:flutter/lib/ui/ui_dart_state.cc(171)] Unhandled Exception: Unknown DBus data type '5fc6b82c95f466712
    l      =   s    :1.297  u   g s  s    org.freedesktop.DBus    '
    #0      DBusReadBuffer.readDBusValue (package:dbus/src/dbus_read_buffer.dart:253:7)
    #1      DBusReadBuffer.readDBusVariant (package:dbus/src/dbus_read_buffer.dart:160:22)
    #2      DBusReadBuffer.readDBusValue (package:dbus/src/dbus_read_buffer.dart:239:14)
    #3      DBusReadBuffer.readDBusStruct (package:dbus/src/dbus_read_buffer.dart:169:19)
    #4      DBusReadBuffer.readDBusValue (package:dbus/src/dbus_read_buffer.dart:251:14)
    #5      DBusReadBuffer.readDBusArray (package:dbus/src/dbus_read_buffer.dart:184:19)
    #6      DBusMessage.unmarshal (package:dbus/src/dbus_message.dart:125:26)
    #7      DBusClient._processMessages (package:dbus/src/dbus_client.dart:488:18)
    #8      DBusClient._processData (package:dbus/src/dbus_client.dart:463:20)
    #9      _rootRunUnary (dart:async/zone.dart:1198:47)
    #10     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
    #11     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
    #12     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
    #13     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285:7)
    #14     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:808:19)
    #15     _StreamController._add (dart:async/stream_controller.dart:682:7)
    #16     _StreamController.add (dart:async/stream_controller.dart:624:5)
    #17     _Socket._onData (dart:io-patch/socket_patch.dart:2043:41)
    #18     _rootRunUnary (dart:async/zone.dart:1206:13)
    #19     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
    #20     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)
    #21     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:357:11)
    #22     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:285:7)
    #23     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:808:19)
    #24     _StreamController._add (dart:async/stream_controller.dart:682:7)
    #25     _StreamController.add (dart:async/stream_controller.dart:624:5)
    #26     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1579:33)
    #27     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1075:14)
    #28     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
    #29     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
    
    opened by long1eu 6
  • bumped minimum Dart SDK constraint to 2.17

    bumped minimum Dart SDK constraint to 2.17

    0.7.4 declares that it depends xml 6.1.0+, which requires a minimum Dart SDK version of 2.17 but dbus still says the minimum it needs is 2.15. This PR is to address this so that it properly declares the minimum supported Dart SDK

    Two things that came to mind when I noticed this though

    1. Potentially dbus should've published 0.7.4 as 0.8.0
    2. The build actions aren't catching this issue. I'm not that familiar with GitHub but from the workflows I've seen, the containers being referenced point to dart:stable. I suspect this could lead to a version drift of the sorts and the repository may need some way to check that the package still supports the minimum Dart SDK version that it advertises
    opened by MaikuB 5
  • Including this package breaks flutter web again

    Including this package breaks flutter web again

    Version 0.4.0 worked fine but the newest version again makes it impossible to build the flutter project on web.

    [        ] Target dart2js failed: Exception: /root/.pub-cache/hosted/pub.dartlang.org/dbus-0.5.2/lib/src/dbus_value.dart:252:49:
               Error: The integer literal 9223372036854775807 can't be represented exactly in JavaScript.
                   if (value < -9223372036854775808 || value > 9223372036854775807) {
                                                               ^^^^^^^^^^^^^^^^^^^
               Error: Compilation failed.
    [   +1 ms] Compiling lib/main.dart for the Web... (completed in 11.0s)
    [        ] "flutter web" took 15,526ms.
    [   +2 ms] Exception: Failed to compile application for the Web.
    [        ] 
               #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
               #1      buildWeb (package:flutter_tools/src/web/compile.dart:85:5)
               <asynchronous suspension>
               #2      BuildWebCommand.runCommand (package:flutter_tools/src/commands/build_web.dart:91:5)
               <asynchronous suspension>
               #3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1043:27)
               <asynchronous suspension>
               #4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
               <asynchronous suspension>
               #5      CommandRunner.runCommand (package:args/command_runner.dart:196:13)
               <asynchronous suspension>
               #6      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)
               <asynchronous suspension>
               #7      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
               <asynchronous suspension>
               #8      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)
               <asynchronous suspension>
               #9      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
               <asynchronous suspension>
               #10     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
               <asynchronous suspension>
               #11     main (package:flutter_tools/executable.dart:91:3)
               <asynchronous suspension>
    [   +1 ms] ensureAnalyticsSent: 0ms
    [        ] Running shutdown hooks
    [        ] Shutdown hooks complete
    [        ] exiting with code 1
    
    opened by krillefear 5
  • Broadcast D-Bus signal stream

    Broadcast D-Bus signal stream

    Fixes half of the issue described in https://github.com/canonical/dbus.dart/issues/293#issuecomment-986817974:

    StateError: Bad state: Stream has already been listened to.
    #0      _StreamController._subscribe (dart:async/stream_controller.dart:635:7)
    #1      _ControllerStream._createSubscription (dart:async/stream_controller.dart:786:19)
    #2      _StreamImpl.listen (dart:async/stream_impl.dart:473:9)
    #3      DBusSignalStream.listen
    #4      new _ForwardingStreamSubscription (dart:async/stream_pipe.dart:114:10)
    #5      _ForwardingStream._createSubscription (dart:async/stream_pipe.dart:86:16)
    #6      _ForwardingStream.listen (dart:async/stream_pipe.dart:81:12)
    #7      NetworkManagerClient.connect
    
    opened by jpnurmi 4
  • DBusIntrospectAnnotation.toXml() was creating <method> elements

    DBusIntrospectAnnotation.toXml() was creating elements

    Aside from failing to annotate, this bug crashes D-Feet and causes gdbus introspect to report invalid XML. Both D-Feet and gdbus work as expected after this fix is made.

    opened by adrianboyko 4
  • Rename file at `bin/dart_dbus.dart` to `bin/dbus.dart` for ease of use.

    Rename file at `bin/dart_dbus.dart` to `bin/dbus.dart` for ease of use.

    If I add some package intended for use as a CLI to a for a Flutter application's dependencies, I can run that using flutter pub run [package_name] [arg1] ... [argN].

    I'd like to suggest renaming this package's file in /bin, and an update to the readme highlighting that it is possible to consume the CLI in the above way for anyone with the Flutter SDK installed.

    opened by markvideon 0
  • Configure Renovate

    Configure Renovate

    Mend Renovate

    Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.

    🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.


    Detected Package Files

    • .github/workflows/analyze.yml (github-actions)
    • .github/workflows/cla-check.yaml (github-actions)
    • .github/workflows/format.yml (github-actions)
    • .github/workflows/test.yml (github-actions)
    • pubspec.yaml (pub)

    Configuration

    🔡 Renovate has detected a custom config for this PR. Feel free to ask for help if you have any doubts and would like it reviewed.

    Important: Now that this branch is edited, Renovate can't rebase it from the base branch any more. If you make changes to the base branch that could impact this onboarding PR, please merge them manually.

    What to Expect

    With your current configuration, Renovate will create 3 Pull Requests:

    Update actions/checkout action to v3
    • Schedule: ["at any time"]
    • Branch name: renovate/actions-checkout-3.x
    • Merge into: main
    • Upgrade actions/checkout to v3
    Update codecov/codecov-action action to v3
    • Schedule: ["at any time"]
    • Branch name: renovate/codecov-codecov-action-3.x
    • Merge into: main
    • Upgrade codecov/codecov-action to v3
    Update subosito/flutter-action action to v2
    • Schedule: ["at any time"]
    • Branch name: renovate/subosito-flutter-action-2.x
    • Merge into: main
    • Upgrade subosito/flutter-action to v2

    🚸 Branch creation will be limited to maximum 2 per hour, so it doesn't swamp any CI resources or spam the project. See docs for prhourlylimit for details.


    ❓ Got questions? Check out Renovate's Docs, particularly the Getting Started section. If you need any further assistance then you can also request help here.


    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 1
  • Addition of Copyright notice

    Addition of Copyright notice

    Hello! Can you add Copyright notice in your License file in the form like "Copyright (c) [year] [copyright owner]" bacause it is unreal to identify the copyright owner of your software now. Thank you in advance

    opened by julia410m 0
  • Unhandled exception: No class info for DBusSignature

    Unhandled exception: No class info for DBusSignature

    I keep getting this error on the debugging console in Android Studio:

    Unhandled exception:
    file:///home/szabi/.pub-cache/hosted/pub.dartlang.org/dbus-0.7.4/lib/src/dbus_value.dart: No class info for DBusSignature
    #0      ClosedWorldClassHierarchy.infoFor (package:kernel/class_hierarchy.dart:516:7)
    #1      ClosedWorldClassHierarchy.getInterfaceMembers (package:kernel/class_hierarchy.dart:827:43)
    #2      ClosedWorldClassHierarchy.getInterfaceMember (package:kernel/class_hierarchy.dart:821:25)
    #3      TypeInferrerImpl._computeAssignabilityKind (package:front_end/src/fasta/type_inference/type_inferrer.dart:807:26)
    #4      TypeInferrerImpl.ensureAssignableResult (package:front_end/src/fasta/type_inference/type_inferrer.dart:582:47)
    #5      TypeInferrerImpl.ensureAssignable (package:front_end/src/fasta/type_inference/type_inferrer.dart:509:12)
    #6      TypeInferrerImpl._inferInvocation (package:front_end/src/fasta/type_inference/type_inferrer.dart:2649:24)
    #7      TypeInferrerImpl.inferInvocation (package:front_end/src/fasta/type_inference/type_inferrer.dart:2155:12)
    #8      InferenceVisitor.visitConstructorInvocation (package:front_end/src/fasta/kernel/inference_visitor.dart:700:49)
    #9      ConstructorInvocation.accept1 (package:kernel/ast.dart:6383:9)
    #10     TypeInferrerImpl._inferExpression (package:front_end/src/fasta/type_inference/type_inferrer.dart:2032:27)
    #11     TypeInferrerImpl.inferNullAwareExpression (package:front_end/src/fasta/type_inference/type_inferrer.dart:2076:40)
    #12     InferenceVisitor.visitMethodInvocation (package:front_end/src/fasta/kernel/inference_visitor.dart:2904:49)
    #13     MethodInvocation.acceptInference (package:front_end/src/fasta/kernel/internal_ast.dart:4644:20)
    #14     TypeInferrerImpl._inferExpression (package:front_end/src/fasta/type_inference/type_inferrer.dart:2030:27)
    #15     TypeInferrerImpl.inferExpression (package:front_end/src/fasta/type_inference/type_inferrer.dart:2067:40)
    #16     InferenceVisitor.visitReturnStatement (package:front_end/src/fasta/kernel/inference_visitor.dart:5947:61)
    #17     ReturnStatement.accept (package:kernel/ast.dart:9864:43)
    #18     TypeInferrerImpl.inferStatement (package:front_end/src/fasta/type_inference/type_inferrer.dart:4115:24)
    #19     TypeInferrerImpl.inferFunctionBody (package:front_end/src/fasta/type_inference/type_inferrer.dart:2112:39)
    #20     BodyBuilder.parseSingleExpression (package:front_end/src/fasta/kernel/body_builder.dart:1757:62)
    #21     SourceLoader.buildExpression (package:front_end/src/fasta/source/source_loader.dart:1239:21)
    <asynchronous suspension>
    #22     IncrementalCompiler.compileExpression.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:1961:39)
    <asynchronous suspension>
    #23     IncrementalCompiler.compileExpression (package:front_end/src/fasta/incremental_compiler.dart:1782:12)
    <asynchronous suspension>
    #24     FrontendCompiler.compileExpression (file:///b/s/w/ir/cache/builder/sdk/pkg/frontend_server/lib/frontend_server.dart:864:27)
    <asynchronous suspension>
    the Dart compiler exited unexpectedly.
    the Dart compiler exited unexpectedly.
    

    And debugging crashes, but the app continues to run.

    opened by szekelyisz 0
  • FR: making mocking simple

    FR: making mocking simple

    Something similar to how it is done in flutter with - TestDefaultBinaryMessengerBinding.instance!.defaultBinaryMessenger.setMockMethodCallHandler(_methodChannel, _methodHandler);

    Say for example, consider following dependecny graph my_app -> connectivity_plus -> connectivity_plus_linux -> dbus - know as a app developer - I would want to mock and test certain behaviour based on the result of where it is connected. It is possible to do this with other platform (like Android, iOS, mac which uses Flutter Platform Channels internally), but not with Linux as of now.

    PS: I recently published mock_plugin - to simplify mocking "plugin" library for the end-application developer to mock plugin behaviours - turns out most plugins supporting Linux, uses dbus.dart - I would love to support that too with mock_plugin if there is a way to mock DBus client/channel/messages.

    opened by daadu 4
Pure Dart Argon2 algorithm (the winner of the Password Hash Competition 2015) for all Dart platforms (JS/Web, Flutter, VM/Native).

argon2 Pure Dart Argon2 algorithm (the winner of the Password Hash Competition 2015) for all Dart platforms (JS/Web, Flutter, VM/Native). Based on the

Graciliano Monteiro Passos 8 Dec 22, 2021
Native context menu for Flutter apps

native_context_menu Native context menu for flutter apps Installation flutter pub add native_context_menu Usage import 'package:native_context_menu/na

Andrei Lesnitsky 151 Dec 22, 2022
A simple, modern AppImageHub Client, powered by flutter.

AppImagePool Simple AppImageHub Client Main Features FLOSS and non profit app Simple categories Download from github directly, no extra-server involve

Prateek SU 488 Dec 30, 2022
Invoice Ninja client built with Flutter

Invoice Ninja Client app for the Invoice Ninja web app. Google Play Store: v4 | v5 Apple App Store: v4 | v5 Setting up the app Initialize the config f

Invoice Ninja 1.3k Dec 30, 2022
❄️ An extension based Anime & Manga client.

Yukino Yukino lets you read manga or stream anime ad-free from multiple sources. The project's name "Yukino" meaning "Snow" named after the character

Yukino 204 Jan 6, 2023
Just a jellyfin client made in flutter (side project quality code)

jellyflut A jellyfin client made in Flutter It's a beta, it works okay. You can : Play a video Read a book Listen Music Look photos SQLite to have log

Thomas SOHIER 106 Jan 4, 2023
An eventual FIBS client written in Flutter and hosted on the web

fibscli An eventual FIBS client written in Flutter and hosted on the web. status Currently, the app works as a stand-alone backgammon game w/o connect

Chris Sells 10 Oct 26, 2022
🎞 Flutter media playback, broadcast & recording library for Windows, Linux & macOS. Written in C++ using libVLC & libVLC++. (Both audio & video)

dart_vlc Flutter media playback, broadcast, recording & chromecast library for Windows, Linux & macOS. Written in C++ using libVLC & libVLC++. Install

Hitesh Kumar Saini 417 Dec 29, 2022
Flutter library for window blur & transparency effects for on Windows & Linux. 💙

flutter_acrylic Window blur & transparency effects for Flutter on Windows & Linux Installation Mention in your pubspec.yaml. dependencies: ... flu

Hitesh Kumar Saini 437 Dec 31, 2022
🎵 A cross-platform media playback library for C/C++ with good number of features (only Windows & Linux).

libwinmedia A cross-platform media playback library for C/C++ & Flutter with good number of features. Example A very simple example can be as follows.

Harmonoid 38 Nov 2, 2022
An 🎵 audio playback library for Flutter Desktop. Supports Windows & Linux. Based on miniaudio.

✒ libwinmedia is sequel to this project. It provides network playback, better format support, control & features. An audio playback library for Flutte

Hitesh Kumar Saini 50 Oct 31, 2022
Dart web - Experimental web framework for Dart. Supports SPA and SSR

dart_web Experimental web framework for Dart. Supports SPA and SSR. Relies on pa

Kilian Schulte 307 Dec 23, 2022
A Dart FFI package to send 💬 toasts on Windows. Written in C++, based on WinToast.

desktoasts A Dart package to send native ?? toasts on Windows. Installation For Flutter dependencies: ... desktoasts: ^0.0.2 For Dart CLI here Sup

Hitesh Kumar Saini 37 Mar 7, 2022
A Dart/Flutter package to register/query/remove URI Schemes without hassle.

protocol_registry Register/query/remove URI Schemes without hassle. Available for Windows and Linux. Installation flutter pub add protocol_registry Us

ZYROUGE 10 Oct 25, 2022
Build Win32 apps with Dart!

A package that wraps some of the most common Win32 API calls using FFI to make them accessible to Dart code without requiring a C compiler or the Wind

Tim Sneath 609 Jan 2, 2023
Biyi (比译) is a convenient translation and dictionary app written in dart / Flutter.

biyi_app Biyi is a convenient translation and dictionary app written in dart / Flutter. View document "Biyi" (比译) is the Chinese word for "Comparison

biyidev 894 Jan 1, 2023
Implementation of libadwaita for flutter/dart

Implementation of the theme from libadwaita. Inspired by the yaru theme for flutter. Usage import 'package:flutter/material.dart'; import 'package:adw

GTK Flutter 164 Dec 26, 2022
Serverpod is a next-generation app and web server, explicitly built for the Flutter and Dart ecosystem.

Serverpod Serverpod is a next-generation app and web server, explicitly built for the Flutter and Dart ecosystem. It allows you to write your server-s

Serverpod 1k Jan 8, 2023
A pure Dart implementation of Firebase with initial support aimed at FlutterFire for Linux & Windows.

FlutterFire Desktop A work in progress pure Dart implementation of Firebase with initial support aimed at FlutterFire for Linux & Windows. A FlutterFi

Invertase 293 Jan 4, 2023