Skip to content
pubscout

internet_connection_checker

3.0.1, released 2 years ago by an unverified publisher

Verifies active internet connectivity and detects slow connections by checking accessible URIs.

WASM-ready
$ flutter pub add internet_connection_checker
Source repository

What it does

Checks for actual internet access by pinging or requesting accessible URIs, overcoming limitations of basic connection state plugins. Provides streams for tracking connectivity changes and supports slow connection detection.

AI-written summary of version 3.0.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to verify if the device has actual internet access rather than just a local network link.
  • Your app needs to react dynamically to internet connection availability changes.
  • You want to detect slow internet connections to manage user experience.

Skip it when

  • You only need to know basic local network availability without verifying server reachability.
  • You fail to dispose of instances or listeners, risking memory leaks.

Strengths

  • Reliable actual internet check rather than just checking network hardware status.
  • Supports status change streams for reactive applications.
  • Cross-platform support including Android, iOS, macOS, Web, Linux, and Windows.

Weaknesses

  • Requires manual disposal of instances and stream subscriptions to prevent memory leaks.
  • Network requests to external URIs can consume battery or data if checked too frequently.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3

On Android, add INTERNET and ACCESS_NETWORK_STATE permissions to AndroidManifest.xml. On macOS, add network entitlements.

import 'package:internet_connection_checker/internet_connection_checker.dart';

void main() async {
  final bool isConnected = await InternetConnectionChecker.instance.hasConnection;
  if (isConnected) {
    print('Device is connected to the internet');
  } else {
    print('Device is not connected to the internet');
  }
}

Alternatives

Packages that do the same job and could replace internet_connection_checker.

Works with

Packages commonly used together with internet_connection_checker: ones it builds on, ones built on it, and its own family.