connectionStatus property
Future<DataConnectionStatus>
get
connectionStatus
Initiates a request to each address in addresses.
If at least one of the addresses is reachable
we assume an internet connection is available and return true
DataConnectionStatus.connected.
DataConnectionStatus.disconnected otherwise.
Implementation
Future<DataConnectionStatus> get connectionStatus async {
return await hasConnection
? DataConnectionStatus.connected
: DataConnectionStatus.disconnected;
}