ConnectivityListener constructor

ConnectivityListener({
  1. String? hostname,
  2. int? port,
  3. Duration checkInterval = const Duration(seconds: 10),
})

Implementation

ConnectivityListener(
    {this.hostname,
    this.port,
    this.checkInterval = const Duration(seconds: 10)}) {
  if (hostname != null && port == null) {
    throw ArgumentError('port may not be null if hostname is provided');
  }
  if (hostname == null && port != null) {
    throw ArgumentError('hostname may not be null if port is provided');
  }
}