InternetConnectivity class

The InternetConnectivity class is responsible for observing the internet connectivity using the InternetObservingStrategy and a StreamController to emit internet connection changes. If no strategy is supplied when creating InternetConnectivity, the DefaultObServingStrategy will be used.

InternetConnectivity({InternetObservingStrategy? internetObservingStrategy}) {

Constructors

InternetConnectivity({InternetObservingStrategy? internetObservingStrategy})

Properties

hashCode int
The hash code for this object.
no setterinherited
hasInternetConnection Future<bool>
The Check to know if the device has internet connection final hasInternet = await InternetConnectivity().hasInternetConnection;
no setter
observeInternetConnection Stream<bool>
Steam to emit internet connection changes i.e from Offline to online or vise versa Changes are only pushed when the stream has an active listener
no setter
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