connectivity_wrapper 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.
All addresses are pinged simultaneously. On successful result (socket connection to address/port succeeds) a true boolean is pushed to a list, on failure (usually on timeout, default 10 sec) a false boolean is pushed to the same list.
Classes
- AddressCheckOptions
- AddressCheckOptions is used to configure the address check options.
- AddressCheckResult
- AddressCheckResult is used to store the result of the address check. It contains the options used for the address check and a boolean indicating whether the address check was successful.
- ConnectivityAppWrapper
- ConnectivityAppWrapper is a StatelessWidget.
- ConnectivityScreenWrapper
- ConnectivityScreenWrapper is a StatelessWidget that wraps a widget and displays an offline widget if the connectivity status is not CONNECTED.
- ConnectivityWidgetWrapper
- ConnectivityWidgetWrapper is a StatelessWidget that wraps a widget and displays an offline widget if the connectivity status is not CONNECTED.
- ConnectivityWrapper
- ConnectivityWrapper is a class that provides a way to check the connectivity status of the device.
Enums
- ConnectivityStatus
- Connection Status Check Result
- PositionOnScreen
- PositionOnScreen is an enum that represents the position of the offline widget.