super_dns_client
0.3.11, released 7 weeks ago by an unverified publisher
A DNS resolver for Dart and Flutter supporting DoH and traditional UDP/TCP lookups.
What it does
Performs DNS-over-HTTPS and traditional UDP/TCP lookups with system-aware DNS discovery across Android, iOS, macOS, Linux, and other platforms. It supports querying A, AAAA, CNAME, SRV, and TXT records with built-in public resolver fallbacks and caching.
AI-written summary of version 0.3.11, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to perform custom DNS queries (A, AAAA, TXT, SRV, CNAME) inside a Flutter or Dart application.
- You want to query DNS-over-HTTPS (DoH) using providers like Cloudflare or Google.
- You need native system DNS discovery on Android and iOS.
Skip it when
- You need custom DoH resolvers that strictly require HTTP/2 (such as Quad9 or Mullvad), as this library uses HTTP/1.1.
- You are running on the Web where browsers restrict raw DNS queries.
Strengths
- Supports both DoH and traditional UDP/TCP DNS lookups.
- Native system DNS detection across Android, iOS, macOS, and Linux.
- Includes public resolver fallbacks and TTL-based SRV caching.
Weaknesses
- Custom DoH resolvers must accept HTTP/1.1 because HTTP/2 is not supported.
- Not supported on the Web due to browser limitations on raw DNS queries.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- Yes (build_runner)
- Direct dependencies
- 7
Android requires ACCESS_NETWORK_STATE permission for system DNS detection.
import 'package:super_dns_client/super_dns_client.dart';
void main() async {
final doh = DnsOverHttps.cloudflare();
final records = await doh.lookup('google.com');
for (var ip in records) {
print('DoH → ${ip.address}');
}
}Alternatives
Packages that do the same job and could replace super_dns_client.
Works with
Packages commonly used together with super_dns_client: ones it builds on, ones built on it, and its own family.
- json_annotationsuper_dns_client depends on itProvides annotations for json_serializable to generate JSON (de)serialization code.
- equatablesuper_dns_client depends on itProvides value‑based equality for Dart objects without manual == and hashCode.
- freezed_annotationsuper_dns_client depends on itAnnotations for the freezed code-generator.
- universal_iosuper_dns_client depends on itCross-platform dart:io implementation with browser support for HttpClient and other APIs