data_connection_checker_nulls library

A pure Dart utility library that checks for an internet connection by opening a socket to a list of specified addresses, each with individual port and timeout. Defaults are provided for convenience.

Classes

AddressCheckOptions
This class should be pretty self-explanatory. If AddressCheckOptions.port or AddressCheckOptions.timeout are not specified, they both default to DataConnectionChecker.DEFAULT_PORT and DataConnectionChecker.DEFAULT_TIMEOUT Also... yeah, I'm not great at naming things.
AddressCheckResult
Helper class that contains the address options and indicates whether opening a socket to it succeeded.
DataConnectionChecker
This is a singleton that can be accessed like a regular constructor i.e. DataConnectionChecker() always returns the same instance.

Enums

DataConnectionStatus
Represents the status of the data connection. Returned by DataConnectionChecker.connectionStatus