nm
0.6.0, released 8 weeks ago by canonical.com
Client for interacting with Linux NetworkManager via D-Bus
What it does
Provides a Dart API to connect, query, and control NetworkManager services on Linux. It exposes methods to activate/deactivate connections, listen to state changes, and retrieve device information.
AI-written summary of version 0.6.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to manage network connections programmatically on Linux
- You want to monitor NetworkManager state in a Dart/Flutter desktop app
Skip it when
- You target non‑Linux platforms
- You need a high‑level HTTP client or REST API
Strengths
- Pure Dart, no native code
- Supports async D‑Bus calls
- Provides detailed connection and device models
- Active test coverage
Weaknesses
- Linux only
- Requires D‑Bus service running
- No built‑in UI widgets
- Limited to NetworkManager API
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
Add dependency, import package, create NetworkManagerClient, call connect()
import 'package:nm/nm.dart';
var client = NetworkManagerClient();
await client.connect();
print('Running NetworkManager ${client.version}');
await client.close();Alternatives
Packages that do the same job and could replace nm.
- stream_chat
Low‑level Dart client for Stream Chat API
91Compare - vexana
Manage your network layer with dio, offering dynamic model parsing, caching, and refresh tokens.
82Compare - http2
An HTTP/2 implementation in Dart for low-level transport and pooled HTTP/2 requests.
91Compare - talker_dio_logger
A lightweight, customizable logger for Dio HTTP client built on Talker.
92Compare
Works with
Packages commonly used together with nm: ones it builds on, ones built on it, and its own family.
- dbusnm depends on itNative Dart D-Bus client for Linux and Windows.
- gsettingsSame familyClient to access GSettings database for storing user preferences on Linux.
- geoclueSame familyDart client for the GeoClue D-Bus geolocation service on Linux.
- upowerSame familyProvides a client to connect to UPower for Linux power management.
- bluezSame familyA Dart client for interacting with the Linux BlueZ Bluetooth stack via D-Bus.
- desktop_notificationsSame familySend Linux desktop notifications via DBus.
- xdg_desktop_portalSame familyA native Dart implementation of portals for Linux desktop applications.
- packagekitSame familyClient for connecting to PackageKit to manage Linux software packages.