check_network library
This is core library where all the implementations file are imported
Classes
- AddressCheckOptions
- This class should be pretty self-explanatory. It takes InternetAddress and int for port and Duration for timeout which then uses CheckInternet to check if the address is reachable.
- AddressCheckResult
- Helper class that contains the address options and indicates whether opening a socket to it succeeded or not.
- CheckInternet
- This is a singleton that can be accessed like a regular constructor i.e. CheckInternet() always returns the same instance. When hasConnection or connectionStatus is called, this utility class tries to ping every address in this list until it finds one which is reachable or runs out of addresses.
- CurrentInternetStatus
- Current internet status. This class will expose stream of current internet status. which can be used to listen to the status changes of the internet.
- Default
- Default values to use when no value is provided.
- InternetStatusProvider
- Material app widget should be wrapped with this widget InternetStatusProvider so, that CurrentInternetStatus can be accessed from anywhere in the app using InternetStatusProvider.of(context)
Enums
- AddressCheckResultStatus
- Represents the status of an address check.
- ConnectionStatus
- Represents the status of the connection status.
- InternetStatus
- These are possible the internet status.