ConnectivityHelper class
Helper to determine if a device has connectivity
Constructors
- ConnectivityHelper({Connectivity connectivityProvider()?})
-
Constructor, optionally takes a
connectivityProvider
to override the defaultConnectivity
instance
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
-
getConnectivityResult(
) → Future< ConnectivityResult> - Returns the method used to connect e.g: Bluetooth, WiFi, Ethernet, Mobile or None
-
hasConnection(
) → Future< bool> - Returns true if the device is connected to an IP network
-
monitorConnection(
) → Stream< bool> - Returns a stream that monitors the connectivity state of the device
-
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