custom_ping
0.5.0, released 2 days ago by an unverified publisher
Checks internet connectivity by sending a HEAD request to a target URL.
What it does
The package sends a HEAD request to a configurable URL (default Google) and reports whether the device can reach the internet at that moment. It provides a PingService with both a one‑off call and a stream subscription for continuous monitoring.
AI-written summary of version 0.5.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a lightweight way to verify internet reachability before making API calls
- You want to monitor connectivity changes in real time without heavy dependencies
Skip it when
- Precise latency measurement or low‑level ICMP ping is required
- You need detailed network diagnostics beyond a simple HEAD request
Strengths
- Simple API with single method calls
- Works on Android, iOS and macOS
- Supports Swift Package Manager on iOS
Weaknesses
- Only performs a HEAD request, not a true ping
- Limited diagnostic information
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
PingService().getSubscription(callBack: (e) {
setState(() {
pingCount++;
service = 'Ping has connection $e count: $pingCount';
});
});
// or a single check
PingService().pingTick();Alternatives
Packages that do the same job and could replace custom_ping.
- http2
An HTTP/2 implementation in Dart for low-level transport and pooled HTTP/2 requests.
91Compare - nm
Client for interacting with Linux NetworkManager via D-Bus
82Compare - ping_discover_network_forked
Library to ping IP subnets and discover local network devices and services.
48Compare - ping_discover_network_plus
Ping IP subnets and discover local network devices and services.
48Compare