fix: result not known

This commit is contained in:
PapaTutuWawa 2022-01-25 21:08:17 +01:00
parent 0543c7ab8a
commit 35fc89584f

View File

@ -18,9 +18,6 @@ class Moxdns {
static Future<List<SrvRecord>> srvQuery(String domain, bool dnssec) async { static Future<List<SrvRecord>> srvQuery(String domain, bool dnssec) async {
try { try {
final List<dynamic> results = await _channel.invokeMethod("srvQuery", [ domain, dnssec ]); final List<dynamic> results = await _channel.invokeMethod("srvQuery", [ domain, dnssec ]);
} on PlatformException catch(e) {
return const [];
}
final records = List<SrvRecord>.empty(growable: true); final records = List<SrvRecord>.empty(growable: true);
for (var record in results) { for (var record in results) {
@ -38,5 +35,10 @@ class Moxdns {
} }
return records; return records;
} on PlatformException catch(e) {
return const [];
}
return const [];
} }
} }