I'm trying to use the connectivity_plus package to run in a raspberrypi environment width fluter-pi and I get the following error:
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: org.freedesktop.DBus.Error.ServiceUnknown: no .service file provided name org.freedesktop.NetworkManager
#0 DBusClient._callMethod (package:dbus/src/dbus_client.dart:1102:13)
<asynchronous suspend>
#1 DBusClient.callMethod (package:dbus/src/dbus_client.dart:608:12)
<asynchronous suspend>
#2 DBusRemoteObjectManager.getManagedObjects (package:dbus/src/dbus_remote_object_manager.dart:80:18)
<asynchronous suspend>
#3 NetworkManagerClient.connect (package:nm/src/network_manager_client.dart:2351:19)
<asynchronous suspend>
#4 ConnectivityPlusLinuxPlugin.checkConnectivity(package:connectivity_plus/src/connectivity_plus_linux.dart:24:5)
<asynchronous suspend>
#5 MyConnectivity.initialise(package:station_screen/main.dart:781:33)
<asynchronous suspend>
I am testing the exact code of the answer: How to continuously check internet connect or not on Flutter?.
When I run it on my pc with Ubuntu 18.04 it works fine but when I run it on a raspberrypi 4 "Linux raspberrypi 5.15.61-v7l+ #1579 SMP Fri Aug 26 11:13:03 BST 2022 armv7l GNU/Linux" I get the above mentioned error.