ConnectivityPlusStream class
Emits connectivity changes as a stream and future of the current status.
Relies on pkg:connectivity_plus for connectivity detection.
Constructors
-
ConnectivityPlusStream({Set<
ConnectivityResult> allowedConnectivityResults = const <ConnectivityResult>{ConnectivityResult.wifi, ConnectivityResult.mobile, ConnectivityResult.ethernet}, Connectivity? connectivity}) - Creates an instance of ConnectivityPlusStream.
Properties
-
allowedConnectivityResults
→ Set<
ConnectivityResult> -
Not all connectivity modes are created equally. Which modes amount to
connectivity for your purposes is configurable.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isConnected
→ Future<
bool> -
Current device connectivity status.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - Closes all resources.
-
listen(
void fn(bool)) → StreamSubscription< bool> - Live updates of device connectivity.
-
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