LikeConnectivityManager class
Service that monitors interface, internet, and origin-aware server reachability.
Constructors
- LikeConnectivityManager()
-
factory
Properties
-
connectionChange
→ Stream<
bool> -
Emits legacy primary-origin combined status changes.
no setter
- hasConnection → bool
-
Legacy combined status for the configured primary origin.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isInternetConnected → bool
-
Whether the device has a usable interface and internet reachability.
no setter
-
isInternetConnectedListenable
→ ValueListenable<
bool> -
no setter
- isOnline → bool
-
Alias for hasConnection.
no setter
- isServerAvailable → bool
-
Legacy primary-origin server status.
no setter
-
isServerAvailableListenable
→ ValueListenable<
bool> -
no setter
-
originRestorations
→ Stream<
LikeConnectivityTransition> -
Convenience stream containing exact unavailable-to-available transitions.
no setter
-
originTransitions
→ Stream<
LikeConnectivityTransition> -
Emits meaningful reachability transitions independently for each origin.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
statusStream
→ Stream<
bool> -
Alias for connectionChange.
no setter
Methods
-
checkAfterApiFailure(
String serverUrl, {bool force = false}) → void - Starts a non-blocking check after an eligible API failure.
-
checkConnectivity(
{String? serverUrl, bool force = false}) → Future< LikeConnectivityCheckResult> - Checks interface/internet state and optionally an origin's reachability.
-
checkServerReachability(
String serverUrl, {bool force = false}) → Future< LikeConnectivityCheckResult> -
Checks connectivity and reachability for
serverUrl. -
debugConfigure(
{LikeInterfaceCheck? interfaceCheck, LikeInternetCheck? internetCheck, LikeServerCheck? serverCheck, DateTime clock()?, bool? isWeb}) → void - Installs deterministic platform and probe seams for tests.
-
debugSetStatus(
{bool? internet, bool? server}) → void - Manual override retained for existing tests and diagnostics.
-
dispose(
) → void - Stops monitoring. A later init remains safe.
-
forceCheck(
) → Future< void> - Backward-compatible forced check wrapper.
-
init(
{String? serverUrl}) → Future< void> - Initializes monitoring and performs an initial check.
-
isOriginAvailable(
String serverUrl, {bool allowUnknown = true}) → bool -
Returns whether network evidence permits contacting
serverUrl. -
markServerAvailable(
{String? serverUrl}) → void - Records an actual HTTP response as newer success evidence for its origin.
-
Legacy explicit mutation, scoped to
serverUrlor the primary origin. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reset(
) → Future< void> - Resets subscriptions, flights, state, and test seams without closing the singleton permanently.
-
serverAvailabilityFor(
String serverUrl) → bool? -
Returns the last known reachability for
serverUrl. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
canonicalOrigin(
String? serverUrl) → String? -
Returns a canonical
scheme://host:effectivePortorigin.