stopDiscovery function

Future<void> stopDiscovery(
  1. Discovery discovery
)

Stops the specified discovery.

Discoveries must be stopped to free their resources. According to Android documentation, service discovery is an expensive operation, so it should be stopped when it's not needed any more, or when the application is paused.

Implementation

Future<void> stopDiscovery(Discovery discovery) {
  return NsdPlatformInterface.instance.stopDiscovery(discovery);
}