Skip to content
pubscout

upnp_client

1.5.0, released 3 months ago by hillpro.dev

Universal Plug and Play (UPnP) client implementation supporting IGD control and DLNA media casting.

$ flutter pub add upnp_client
Source repository

What it does

Provides SSDP device discovery over IPv4 and IPv6, DLNA media casting with AVTransport and RenderingControl, and NAT port mapping for Internet Gateway Devices (IGD).

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

Use it when

  • You need to discover and interact with UPnP or DLNA devices on a local network.
  • You want to perform NAT port forwarding on a router using UPnP IGD.
  • You need to stream media or control volume on DLNA renderers.

Skip it when

  • You need UPnP eventing (GENA SUBSCRIBE/NOTIFY) or ContentDirectory browsing, which are not covered.
  • Targeting iOS without being willing to request Apple's Multicast Networking entitlement.

Strengths

  • Supports SSDP search over both IPv4 and IPv6 returning typed device profiles.
  • Covers DLNA casting and IGD port forwarding out of the box.
  • Includes helper methods and robust timeout coverage for HTTP communication.

Weaknesses

  • Lacks support for certain UPnP features like eventing (GENA) and ContentDirectory browsing.
  • Requires manual configuration for Multicast Networking capabilities on iOS 14+.

Setup

Kind
Pure Dart
Effort
Medium
Code generation
No
Direct dependencies
2

Requires INTERNET and ACCESS_NETWORK_STATE permissions on Android (plus NEARBY_WIFI_DEVICES), and Multicast Networking capability approval on iOS 14+.

import 'package:upnp_client/upnp_client.dart';

void main() async {
  final discoverer = DeviceDiscoverer();
  await for (final device in discoverer.start()) {
    print('Found device: ${device.friendlyName}');
  }
}

Alternatives

Packages that do the same job and could replace upnp_client.

Works with

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