Snap: fix connectivity_plus
When using the snap version of this app, the listening of connectivity_plus to the system's network state does not work. Here is a recording of the not-snap and the snap version of the app in parallel with going offline then online again:
https://user-images.githubusercontent.com/15329494/189889071-290df06a-8e28-4794-a16a-22b83615302a.mp4
And here is the error when run in a terminal:
[ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.1916" (uid=1000 pid=238345 comm="/snap/snap-store/598/bin/software " label="snap.snap-store.snap-store (enforce)") interface="org.freedesktop.DBus.ObjectManager" member="GetManagedObjects" error name="(unset)" requested_reply="0" destination="org.freedesktop.NetworkManager" (uid=0 pid=1630 comm="/usr/sbin/NetworkManager --no-daemon " label="unconfined")
#0 DBusClient._callMethod (package:dbus/src/dbus_client.dart:1124)
<asynchronous suspension>
#1 DBusClient.callMethod (package:dbus/src/dbus_client.dart:608)
<asynchronous suspension>
#2 DBusRemoteObjectManager.getManagedObjects (package:dbus/src/dbus_remote_object_manager.dart:80)
<asynchronous suspension>
#3 NetworkManagerClient.connect (package:nm/src/network_manager_client.dart:2351)
<asynchronous suspension>
#4 ConnectivityLinux.checkConnectivity (package:connectivity_plus_linux/src/connectivity.dart:24)
<asynchronous suspension>
The snap already includes the network-manager-observe plug, which isn't auto connected. I've request autoconnect, but in the meantime users can manually connect with
snap connect snap-store:network-manager-observe
https://forum.snapcraft.io/t/autoconnect-network-manager-observe-for-the-snap-store-snap/31870
Thank you! :) Meanwhile I'll update the github readme
The snap already includes the network-manager-observe plug, which isn't auto connected. I've request autoconnect, but in the meantime users can manually connect with
snap connect snap-store:network-manager-observehttps://forum.snapcraft.io/t/autoconnect-network-manager-observe-for-the-snap-store-snap/31870
After connecting this works perfectly fine
Bildschirmaufzeichnung vom 03.10.2022, 12:07:11.webm
(off-topic, also can we please all take a moment to cheer for @Jupi007 for this awesome animated icon? Thank you Paul!)
@fthx you can also use the snap-store to connect the snap-store to network observe :smiley_cat:

I did this although it seems like a recursive stuff to me. :-)
