ConnectivityUtils class
Connectivity Utils
Helper class to determine phone connectivity
Constructors
- ConnectivityUtils.test({required Connectivity connectivity, required Client httpClient, int retries = 0, int minSuccessCalls = 1, String? serverToPing})
Properties
- debounceDuration ↔ Duration
-
Sets a new Duration for the verification
getter/setter pair
-
getConnectivityStatusSink
→ Sink<
Event> -
no setter
- getPhoneConnection → bool?
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isPhoneConnectedStream
→ Stream<
bool> -
no setter
- minSuccessCalls ← int
-
Sets a new number of success calls before setting connection to true
no getter
- retries ← int
-
Sets a new number of tries before setting connection to false
no getter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serverToPing ↔ String
-
Sets a new server to ping
getter/setter pair
- timeoutDuration ← Duration
-
Sets a new Duration for the timeout
no getter
- verifyResponseCallback ← VerifyResponseCallback
-
Sets a new VerifyResponseCallback
no getter
Methods
-
dispose(
) → Future< void> -
isPhoneConnected(
) → Future< bool> - Checkf if phone is connected to the internet
-
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
- instance → ConnectivityUtils
-
no setter
Static Methods
-
createTestingInstance(
Connectivity connectivity, Client httpClient) → ConnectivityUtils -
setInstance(
ConnectivityUtils utils) → void