mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-21 05:58:05 +02:00
fix(dependencies): remove unused http_client_adapter from pubspec.yaml
This commit is contained in:
1 parent
91eb1ce5a0
commit
db849599b7
2 files changed
+17
-9
No files matched your search
@@ -1,6 +1,7 @@
|
|||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:dio_cache_interceptor/dio_cache_interceptor.dart';
|
import 'package:dio_cache_interceptor/dio_cache_interceptor.dart';
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
import 'dart:io';
|
||||||
|
|
||||||
/// Advanced network configuration for streaming
|
/// Advanced network configuration for streaming
|
||||||
class NetworkConfig {
|
class NetworkConfig {
|
||||||
@@ -73,7 +74,7 @@ class OptimizedNetworkService {
|
|||||||
|
|
||||||
// Configure proxy if specified
|
// Configure proxy if specified
|
||||||
if (_config.proxyUrl != null) {
|
if (_config.proxyUrl != null) {
|
||||||
_dio.httpClientAdapter = _createProxyAdapter(_config.proxyUrl!);
|
_configureProxy(_config.proxyUrl!);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add interceptors
|
// Add interceptors
|
||||||
@@ -84,11 +85,21 @@ class OptimizedNetworkService {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create HTTP client adapter with proxy support
|
/// Configure native Dart HttpClient with proxy
|
||||||
dynamic _createProxyAdapter(String proxyUrl) {
|
void _configureProxy(String proxyUrl) {
|
||||||
// Implementation for proxy support
|
try {
|
||||||
// This would need to handle HTTP/HTTPS proxies
|
final uri = Uri.parse(proxyUrl);
|
||||||
return null;
|
_dio.httpClientAdapter = HttpClientAdapter(
|
||||||
|
onHttpClientCreate: (client) {
|
||||||
|
client.findProxy = (uri) {
|
||||||
|
return 'PROXY ${uri.host}:${uri.port}';
|
||||||
|
};
|
||||||
|
return client;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
print('Error configuring proxy: $e');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Update network configuration
|
/// Update network configuration
|
||||||
|
|||||||
@@ -59,9 +59,6 @@ dependencies:
|
|||||||
|
|
||||||
# Download Manager
|
# Download Manager
|
||||||
dio_downloader: ^2.1.4
|
dio_downloader: ^2.1.4
|
||||||
|
|
||||||
# Network & Proxy
|
|
||||||
http_client_adapter: ^1.0.0
|
|
||||||
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
|
|||||||
Reference in new issue
Block a user