setConnectivityCheck static method

void setConnectivityCheck({
  1. bool enabled = true,
})

Controls the connectivity check without calling configure.

Useful when you don't need token auth but are on an internal network where the connectivity probe (pinging external hosts) always fails.

Set enabled to false to skip the check; defaults to true (check active).

Example:

// Call before configureDependencies() in your staging entry point.
ApiServices.setConnectivityCheck(enabled: false);

Implementation

static void setConnectivityCheck({bool enabled = true}) {
  _bypassConnectivityCheck = !enabled;
}