IDSInternetChecker class

IDSInternetChecker

This class provides simple, static methods for checking internet connectivity and listening to real-time connectivity changes across all platforms.

Usage:

bool connected = await IDSInternetChecker.isConnected();
IDSInternetChecker.onConnectionChange.listen((isConnected) {
  if (isConnected) {
    // Internet is available
  } else {
    // No internet connection
  }
});

Constructors

IDSInternetChecker.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

onConnectionChange Stream<bool>
A stream that notifies the app when the internet connectivity status changes.
no setter

Static Methods

isConnected() Future<bool>
Checks if the device has an active internet connection.