fourb_mdns 0.5.0
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
✓ Selectedand 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()andMdnsController.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. Addingnsd— a platform plugin — means plain Dart can no longer compile the scanner. The checks moved toexample/integration_test/scan_test.dart, which runs under the Flutter engine, and the README now says so.
0.3.3 #
- Metadata only.
issue_trackerpointed 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.iptook 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, then172.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/ADDRESSESblock. A host advertising a dozen IPv6 link-locals pushed the address anyone actually needs off the card.
0.3.0 #
- Discovery now runs
nsd(AndroidNsdManager, AppleNetService) alongsidemulticast_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,useMulticastDnsandserviceTypesonMdnsScope,MdnsControllerandMdnsScanner. For a single known service type,useMulticastDns: falseis the fastest and most reliable setup.
0.2.0 #
dart run fourb_mdns:configwires an app in one command — wrapsrunApp()inMdnsScopeand writes the iOS, macOS and Android permissions mDNS needs. Idempotent, supports--dry-run,--http-onlyand--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
MdnsColorsandMdnsTheme. - Fixed: storage failures propagated as unhandled exceptions.
SharedPreferencesthrows 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:
MdnsControllerthrewA MdnsController was used after being disposedwhen 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, andscan()returns early once disposed.
0.1.0 #
First release.
MdnsScopewraps 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. httpOnlyfilters to_http._tcp/_https._tcp;filterTogglecontrols the picker's switch.launcher: falseplusshowMdnsPicker(context)for driving it from your own button.- The pick persists to
SharedPreferencesunder4b_mDNS_ipand4b_mDNS_selection, matching the companion React package4b-react-mdns. MdnsScannerandMdnsServiceare usable without any widgets.