Closed kostadin24 closed 1 year ago
Ohh looks like stream is not closed properly. Will look into that.
@kostadin24 implementation in v3.2.2 has changed, can you check with latest version and tell us.
Hi, sorry for not confirming it for months :( But other urgent stuff appeared. With version 4.0.2 of plugn: I see OnDone when use resultsInAddressAscendingOrder: true Never see OnDone when resultsInAddressAscendingOrder: false
You are using HostScanner Should use HostScannerFlutter
Until now I was using getAllPingableDevices - works fine. Switched to version with isolate - getAllPingableDevicesAsync. Now I see my devices by ping, but onDone is not executed. Also default for resultsInAddressAscendingOrder=true is ignored This is my code:
final stream3 = HostScanner.getAllPingableDevicesAsync(subnet);//, firstHostId: 1, lastHostId: 254); StreamSubscription ss3 = stream3.listen((host) { list.add(host); print('${host.address}'); }, onDone: () { print('PING stream completed'); }); // Don't forget to cancel the stream when not in use.
This is my output: I/flutter (23907): 192.168.1.1 I/flutter (23907): 192.168.1.167 I/flutter (23907): 192.168.1.177 I/flutter (23907): 192.168.1.188 I/flutter (23907): 192.168.1.197 I/flutter (23907): 192.168.1.113 I/flutter (23907): 192.168.1.130 I/flutter (23907): 192.168.1.149
Message 'PING stream completed' is never printed.
Im on Android 13 Pixel5. Flutter version 3.7.11. network_tools: ^3.2.1