dart_ping 5.1.0
dart_ping: ^5.1.0 copied to clipboard
Multi-platform network ping utility for native desktop and android applications.
Multi-platform network ping utility for Dart applications.
Created from templates made available by Stagehand under a BSD-style license.
Usage #
A simple usage example:
import 'package:dart_ping/dart_ping.dart';
// Create ping object with desired args
final ping = Ping('google.com', count: 5);
// Begin ping process and listen for output
ping.stream.listen((event) {
print(event);
});
// Waiting for ping to output first two results
// Not needed in actual use. For example only
await Future.delayed(Duration(seconds: 2));
// Stop the ping prematurely and output a summary
// Make sure you do not call this before listening to the stream!
await ping.stop();
Features and bugs #
Please file feature requests and bugs at the issue tracker.
Credit #
This package contains code from flutter_icmp_ping by zuvola, used with permission.