Package selection guidance compiled from public package information, community data, and project usage.
The network_tools package is a Flutter utility library designed to assist with network discovery and diagnostics. It enables developers to scan subnets, detect open ports, and identify devices on a local network. Built for cross-platform use, it supports Android, iOS, macOS, Windows, and Linux, making it ideal for applications requiring low-level network interaction. The library leverages native platform capabilities through platform channels, ensuring reliable performance across environments. It's particularly useful in network monitoring, IoT device detection, and troubleshooting tools. Its lightweight design and straightforward API make integration simple for developers focused on networking features.
Use cases
Local network scanning
Device discovery on subnet
Port scanning for diagnostics
IoT device detection
Network troubleshooting
Key features
Cross-platform support
Subnet scanning
Open port detection
Device enumeration
Platform channel integration
Suitable for
Network diagnostic apps
IoT management tools
System monitoring utilities
DevTools for network analysis
Educational networking projects
Considerations
Requires appropriate system permissions
May need root/admin access on some platforms
Performance varies by network size
Limited to local network scope
Depends on underlying OS networking capabilities
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Cross Platform Network Tools
Network Tools Supported
Host Scanner
Search all devices on subnet
Get mac address of devices on Linux, macOS and Windows.
Search devices for a specific port open.
Port Scanner
Single Port scan
Range
Custom
Partly Work:
Mdns Scanner
Network Tools Flutter package
Please check network_tools_flutter package for extensive support to features on different platforms.
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
// It's necessary to pass correct path to be able to use this library.final appDocDirectory = awaitgetApplicationDocumentsDirectory();
awaitconfigureNetworkTools(appDocDirectory.path, enableDebugging: true);
runApp(constMyApp());
}
Usage
Host Scanner
String address = '192.168.1.12';
// or You can also get address using network_info_plus package// final String? address = await (NetworkInfo().getWifiIP());finalString subnet = address.substring(0, address.lastIndexOf('.'));
final stream = HostScannerService.instance.getAllPingableDevices(subnet, firstHostId: 1, lastHostId: 50,
progressCallback: (progress) {
print('Progress for host discovery : $progress');
});
stream.listen((host) {
//Same host can be emitted multiple times//Use Set<ActiveHost> instead of List<ActiveHost>print('Found device: $host');
}, onDone: () {
print('Scan completed');
}); // Don't forget to cancel the stream when not in use.