setNetworkStatus function

void setNetworkStatus(
  1. NetworkStatus status
)

Tells the library whether it may use the network.

While the status is NetworkStatus.offline, the library starts no network requests. The requests that wait start when the status returns to NetworkStatus.online. The status starts as online and applies to every runtime in the process.

See mln_network_set_status in the C API reference.

Implementation

void setNetworkStatus(NetworkStatus status) {
  ensureAbiVersion();
  return _check(raw.mln_network_set_status(status.rawValue, nativeDiagnostic));
}