fourb_mdns 0.5.0 copy "fourb_mdns: ^0.5.0" to clipboard
fourb_mdns: ^0.5.0 copied to clipboard

Let people pick a server off the local network from inside your Flutter app, and remember which one they chose. Scans mDNS/Bonjour natively — no server.

Changelog #

0.5.0 #

  • Picking a server no longer closes the picker. The choice is confirmed in place — the card shows ✓ Selected and the saved bar appears — and you can change it without reopening. The ✕ closes it.
  • showMdnsPicker() therefore returns whatever is selected when the picker closes, rather than only the service tapped to dismiss it. A caller that selected nothing gets the previous pick back instead of null.

0.4.0 #

  • The picker gains a Stop button while a sweep is running, matching the React package. A scan can now be abandoned instead of waited out — MdnsScanner.stop() and MdnsController.stop() end the sweep promptly and keep whatever was already found.
  • Fixed: dart run tool/live_scan.dart, which the README advertised, has been broken since 0.3.0. Adding nsd — a platform plugin — means plain Dart can no longer compile the scanner. The checks moved to example/integration_test/scan_test.dart, which runs under the Flutter engine, and the README now says so.

0.3.3 #

  • Metadata only. issue_tracker pointed at the clone URL rather than the issues page, so the "View/report issues" link on pub.dev went nowhere useful.

0.3.2 #

  • Fixed: MdnsService.ip took the first IPv4 it saw, which on a host running containers is the Docker bridge (172.17.x) — an address reachable from nowhere but that machine. Addresses are now ranked: routable IPv4, then IPv6, then 172.16–31.x, then link-local, then anything unrecognised.
  • The card's address now carries a tooltip listing every address the host resolved to, so simplifying the card didn't hide information.

0.3.1 #

  • Picker cards now show the service name and the one dialable address, instead of the full TYPE / HOST / ADDRESSES block. A host advertising a dozen IPv6 link-locals pushed the address anyone actually needs off the card.

0.3.0 #

  • Discovery now runs nsd (Android NsdManager, Apple NetService) alongside multicast_dns. The native backend resolves reliably and satisfies the Local Network permission the way the OS expects, but only finds types you name; the raw sweep still provides wildcard type enumeration. Results merge by fully-qualified name, unioning addresses.
  • New useNsd, useMulticastDns and serviceTypes on MdnsScope, MdnsController and MdnsScanner. For a single known service type, useMulticastDns: false is the fastest and most reliable setup.

0.2.0 #

  • dart run fourb_mdns:config wires an app in one command — wraps runApp() in MdnsScope and writes the iOS, macOS and Android permissions mDNS needs. Idempotent, supports --dry-run, --http-only and --no-launcher, and skips platforms the project doesn't have.
  • The picker now matches the companion React package's design: dark panel, card grid, live status chip, search field, saved-server bar, and a launcher pill with a pulsing dot. It brings its own palette rather than inheriting the host app's theme, so it looks the same in every app.
  • Added a search field to the picker, and Open ↗ on cards for services with a URL.
  • MdnsController.seed() injects services without scanning, so you can widget-test your own UI.
  • Exported MdnsColors and MdnsTheme.
  • Fixed: storage failures propagated as unhandled exceptions. SharedPreferences throws in a plain widget test (and can fail on device); reads now return null and writes report false instead of taking the app down.

0.1.1 #

  • Fixed: MdnsController threw A MdnsController was used after being disposed when the widget went away mid-scan. scan() is async, so the sweep could finish after disposal and then notify a dead notifier — any app navigating away during a scan hit this. All notifications are now guarded, and scan() returns early once disposed.

0.1.0 #

First release.

  • MdnsScope wraps an app and layers a server picker over it; MdnsScope.of(context) reads the scan and the pick from anywhere below.
  • Native mDNS discovery via multicast_dns — no companion server required.
  • httpOnly filters to _http._tcp / _https._tcp; filterToggle controls the picker's switch.
  • launcher: false plus showMdnsPicker(context) for driving it from your own button.
  • The pick persists to SharedPreferences under 4b_mDNS_ip and 4b_mDNS_selection, matching the companion React package 4b-react-mdns.
  • MdnsScanner and MdnsService are usable without any widgets.
1
likes
160
points
273
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Let people pick a server off the local network from inside your Flutter app, and remember which one they chose. Scans mDNS/Bonjour natively — no server.

Repository
View/report issues

Topics

#mdns #bonjour #discovery #networking

License

MIT (license)

Dependencies

flutter, meta, multicast_dns, nsd, shared_preferences, url_launcher

More

Packages that depend on fourb_mdns