FlutterNsd class

Singleton API for managing Network Service Discovery

Get the singleton by calling FlutterNsd() and listen to its stream for NsdServiceInfo emissions. Then invoke discoverServices to start service discovery. Stop discovery by calling stopDiscovery when you're done.

Constructors

FlutterNsd()
Factory for getting FlutterNsd singleton object
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stream Stream<NsdServiceInfo>
Stream that emits a NsdServiceInfo for each service discovered or a NsdError in case of an error.
no setter

Methods

discoverServices(String serviceType) Future<void>
Start network service discovery for serviceType for an infinite amount of time (or until the app process is killed). Make sure to call stopDiscovery when you're done.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stopDiscovery() Future<void>
Stop network service discovery
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited