StealthInternetChecker constructor

StealthInternetChecker({
  1. Duration checkInterval = const Duration(seconds: 2),
  2. Duration timeout = const Duration(seconds: 2),
  3. InternetAddress? target,
  4. int port = 53,
})

Implementation

StealthInternetChecker({
  this.checkInterval = const Duration(seconds: 2),
  this.timeout = const Duration(seconds: 2),
  InternetAddress? target,
  this.port = 53, // DNS port
}) {
  this.target = target ?? InternetAddress('8.8.8.8');
  _controller = StreamController<bool>.broadcast(
    onListen: _start,
    onCancel: _stop,
  );
}