StealthInternetChecker constructor

StealthInternetChecker({
  1. Duration checkInterval = const Duration(seconds: 2),
  2. Duration timeout = const Duration(seconds: 2),
  3. int failureThreshold = 2,
  4. List<String>? hosts,
  5. List<Uri>? endpoints,
  6. InternetAddress? target,
  7. int port = 53,
})

Implementation

StealthInternetChecker({
  this.checkInterval = const Duration(seconds: 2),
  this.timeout = const Duration(seconds: 2),
  this.failureThreshold = 2,
  List<String>? hosts,
  List<Uri>? endpoints,
  InternetAddress? target,
  int port = 53,
})  : lookupHosts = hosts ?? List.from(defaultLookupHosts),
      probeEndpoints = endpoints ?? List.from(defaultProbeEndpoints) {
  _controller = StreamController<bool>.broadcast(
    onListen: _start,
    onCancel: _stop,
  );
}