mirror of
https://github.com/R0m1k3/xtremobile.git
synced 2026-10-23 15:18:15 +02:00
feat: Add initial mobile dashboard screen with Xtream data and UI state providers.
This commit is contained in:
1 parent
3145af9e8d
commit
b249074db1
30 files changed
+1217
-582
No files matched your search
@@ -1,7 +1,6 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:dio/io.dart';
|
||||
|
||||
/// Interceptor to fallback to DNS-over-HTTPS if standard DNS fails
|
||||
/// Useful for emulators or restricted networks
|
||||
@@ -15,7 +14,9 @@ class DnsFallbackInterceptor extends Interceptor {
|
||||
|
||||
@override
|
||||
Future<void> onError(
|
||||
DioException err, ErrorInterceptorHandler handler) async {
|
||||
DioException err,
|
||||
ErrorInterceptorHandler handler,
|
||||
) async {
|
||||
// Basic check for connection/host lookup errors
|
||||
if (_isDnsError(err)) {
|
||||
final uri = err.requestOptions.uri;
|
||||
|
||||
@@ -38,8 +38,10 @@ class DnsResolver {
|
||||
return ip;
|
||||
}
|
||||
|
||||
static Future<String?> _queryDoH(String url,
|
||||
{Map<String, String>? headers}) async {
|
||||
static Future<String?> _queryDoH(
|
||||
String url, {
|
||||
Map<String, String>? headers,
|
||||
}) async {
|
||||
try {
|
||||
final client = HttpClient()
|
||||
..connectionTimeout = const Duration(seconds: 10)
|
||||
|
||||
Reference in new issue
Block a user