internet_connection_cs 2.0.1 copy "internet_connection_cs: ^2.0.1" to clipboard
internet_connection_cs: ^2.0.1 copied to clipboard

A Flutter package to check internet connectivity with custom host and timeout parameters.

2.0.0 #

  • 🔧 Improved DNS-based connectivity check - Now verifies actual host reachability
    • DNS lookup is followed by a real socket connection test to ensure true internet connectivity
    • Fixes false positives where device is on local network but cannot reach the internet
    • Correctly returns disconnected when DNS resolves but host is unreachable
  • ✅ Added comprehensive tests for real-world connectivity scenarios
  • ✅ Enhanced reliability for internet connection detection

1.0.0 #

  • Initial release
  • Zero external dependencies - Uses only Dart's built-in features
  • DNS Lookup based connectivity using InternetAddress.lookup()
  • Socket based connectivity for faster, lightweight checks
  • URL parsing and domain extraction - Automatically extracts domain from URLs
  • ✅ Configurable timeout duration for both DNS and Socket methods
  • ✅ Simple boolean and enum-based status returns
  • ✅ Continuous monitoring with streams (DNS and Socket based)
  • ✅ Singleton pattern for efficient resource usage
  • ✅ Comprehensive error handling for all scenarios
  • ✅ Extension methods for InternetConnectionStatus enum
  • ✅ Complete test coverage for DNS and Socket methods
  • ✅ Detailed example usage and documentation
0
likes
155
points
16
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A Flutter package to check internet connectivity with custom host and timeout parameters.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on internet_connection_cs