Is it possible to add existing address to List and return it from Stream?
In this example we just print existing ip addresses, but can we return they?
import 'package:ping_discover_network/ping_discover_network.dart';
final String ip = await Wifi.ip;
final String subnet = ip.substring(0, ip.lastIndexOf('.'));
final int port = 80;
final stream = NetworkAnalyzer.discover2(subnet, port);
stream.listen((NetworkAddress addr) {
if (addr.exists) {
print('Found device: ${addr.ip}');
}
});
Is it possible to add existing address to List and return it from Stream?
In this example we just print existing ip addresses, but can we return they?