flutter_nsd
1.6.0, released 2 years ago by nimroddayan.com
Network Service Discovery (mDNS) plugin for Android, iOS, MacOS, and Windows.
What it does
A Flutter plugin for Network Service Discovery (mDNS) that uses platform APIs on Android, iOS, MacOS, and Windows. It allows applications to discover services on the local network and receive updates through a stream.
AI-written summary of version 1.6.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to discover local network services (mDNS) across Android, iOS, MacOS, and Windows.
- Your app interacts with local network devices like printers or servers.
Skip it when
- You need to register services rather than just discover them.
- You are developing for platforms other than Android, iOS, MacOS, and Windows.
Strengths
- Supports multiple platforms including Android, iOS, MacOS, and Windows.
- Uses platform-native APIs where available.
Weaknesses
- Discovery only, service registration is not supported.
- iOS and macOS implementations do not return hostAddresses.
- Requires specific platform configurations like Info.plist keys on iOS.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 0
Requires adding Bonjour Services and Local Network Usage Description keys in Info.plist for iOS 14+. Android requires API level 21+ and a real device instead of an emulator.
final flutterNsd = FlutterNsd();
flutterNsd.stream.listen((nsdServiceInfo) {
print('Discovered service name: ${nsdServiceInfo.name}');
});
await flutterNsd.discoverServices('_http._tcp.');Alternatives
Packages that do the same job and could replace flutter_nsd.
- nsd
Flutter plugin for network service discovery and registration (mDNS, Bonjour, DNS-SD).
71Compare - flutter_foreground_task
Implement and manage foreground services on Android and iOS platforms.
89Compare - flutter_accessibility_service
Flutter plugin to interact with Android Accessibility Service for events and actions.
71Compare - confirm_connection_network
Check network connectivity status on Android and iOS devices.
44Compare