SConnectivity class

Connectivity facade for listening to internet status changes across the app.

Use SConnectivity.listenable in widgets and initialiseInternetConnectivityListener during app startup.

Constructors

SConnectivity()

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

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

Static Properties

isConnected bool
Current connectivity state.
no setter
listenable ValueListenable<bool>
Preferred listener for new code.
no setter
showNoInternetSnackbar bool
Whether the no-internet snackbar overlay is enabled.
no getter

Static Methods

disposeInternetConnectivityListener() Future<void>
emitCurrentStateNow() → void
Emits callbacks for the currently known state.
hardReset() Future<void>
Forcefully reset everything (useful for Flutter Web hot restart).
initialiseInternetConnectivityListener({VoidCallback? onConnected, VoidCallback? onDisconnected, bool showDebugLog = false, bool showNoInternetSnackbar = false, NoInternetSnackbar? customNoInternetSnackbar, bool emitInitialStatus = false}) Future<void>