lan_scanner 3.1.1 lan_scanner: ^3.1.1 copied to clipboard
A package that allows discovering network devices via multi-threaded ICMP pings.
lan_scanner #
Dart / Flutter package that allows discovering network devices in local network (LAN).
Note: This library is intended to be used on Class C networks.
Getting Started #
Add the package to your pubspec.yaml:
lan_scanner: ^3.1.1
Import the library:
import 'package:lan_scanner/lan_scanner.dart';
Create an instance of the class and call
icmpScan()
on it:
final stream = scanner.icmpScan('192.168.0');
stream.listen((HostModel device) {
print("Found host: ${device.ip}");
});
If you don't know what is your subnet, you can use network_info_plus and then ipToSubnet()
function.
var wifiIP = await (NetworkInfo().getWifiIP())
var subnet = ipToSubnet(wifiIP);
Features, bugs and contributions #
Feel free to contribute to this project.
Please file feature requests and bugs at the issue tracker. If you fixed a bug or implemented feature by yourself, feel free to send a pull request.
Sponsoring #
I am working on my packages on my free time. If this package is helping you, please consider buying me a coffee, so I can keep updating and maintaing this package.