DNSConfig class abstract

Available extensions
Annotations
  • @freezed

Constructors

DNSConfig({List<NameServerConfig>? servers, HostsWrapper? hosts, XrayAddress? clientIp, String? tag, DnsQueryStrategy? queryStrategy, bool? disableCache, bool? serveStale, int? serveExpiredTTL, bool? disableFallback, bool? disableFallbackIfMatch, bool? enableParallelQuery, bool? useSystemHosts})
const
factory
DNSConfig.fromJson(Object? json)
factory
DNSConfig.withServers(List<NameServerConfig> servers, {HostsWrapper? hosts, XrayAddress? clientIp, String? tag, DnsQueryStrategy? queryStrategy, bool? disableCache, bool? serveStale, int? serveExpiredTTL, bool? disableFallback, bool? disableFallbackIfMatch, bool? enableParallelQuery, bool? useSystemHosts})
factory

Properties

clientIp XrayAddress?
no setterinherited
copyWith → $DNSConfigCopyWith<DNSConfig>
Create a copy of DNSConfig with the given fields replaced by the non-null parameter values.
no setterinherited
disableCache bool?
no setterinherited
disableFallback bool?
no setterinherited
disableFallbackIfMatch bool?
no setterinherited
enableParallelQuery bool?
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hosts HostsWrapper?
no setterinherited
queryStrategy DnsQueryStrategy?
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serveExpiredTTL int?
no setterinherited
servers List<NameServerConfig>?
no setterinherited
serveStale bool?
no setterinherited
tag String?
no setterinherited
useSystemHosts bool?
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_DNSConfig value)) → TResult

Available on DNSConfig, provided by the DNSConfigPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_DNSConfig value)?) → TResult?

Available on DNSConfig, provided by the DNSConfigPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_DNSConfig value)?, {required TResult orElse()}) → TResult

Available on DNSConfig, provided by the DNSConfigPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(List<NameServerConfig>? servers, HostsWrapper? hosts, XrayAddress? clientIp, String? tag, DnsQueryStrategy? queryStrategy, bool? disableCache, bool? serveStale, int? serveExpiredTTL, bool? disableFallback, bool? disableFallbackIfMatch, bool? enableParallelQuery, bool? useSystemHosts)?, {required TResult orElse()}) → TResult

Available on DNSConfig, provided by the DNSConfigPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(List<NameServerConfig>? servers, HostsWrapper? hosts, XrayAddress? clientIp, String? tag, DnsQueryStrategy? queryStrategy, bool? disableCache, bool? serveStale, int? serveExpiredTTL, bool? disableFallback, bool? disableFallbackIfMatch, bool? enableParallelQuery, bool? useSystemHosts)) → TResult

Available on DNSConfig, provided by the DNSConfigPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(List<NameServerConfig>? servers, HostsWrapper? hosts, XrayAddress? clientIp, String? tag, DnsQueryStrategy? queryStrategy, bool? disableCache, bool? serveStale, int? serveExpiredTTL, bool? disableFallback, bool? disableFallbackIfMatch, bool? enableParallelQuery, bool? useSystemHosts)?) → TResult?

Available on DNSConfig, provided by the DNSConfigPatterns extension

A variant of when that fallback to returning null

Operators

operator ==(Object other) bool
The equality operator.
inherited