checkConnectivity method

Future<LikeConnectivityCheckResult> checkConnectivity({
  1. String? serverUrl,
  2. bool force = false,
})

Checks interface/internet state and optionally an origin's reachability.

Implementation

Future<LikeConnectivityCheckResult> checkConnectivity({
  String? serverUrl,
  bool force = false,
}) {
  // Manual calls intentionally bypass the automatic-failure cooldown. The
  // force flag remains part of the public API for backward compatibility;
  // equivalent in-flight work is always joined, including forced calls.
  return _checkConnectivity(
    serverUrl: serverUrl ?? _serverUrl,
    reason: LikeConnectivityCheckReason.manual,
    forceNewFlight: force,
  );
}