Remove native http client (temporarily)
This commit is contained in:
@@ -1,9 +1,5 @@
|
|||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:hiddify/core/app_info/app_info_provider.dart';
|
import 'package:hiddify/core/app_info/app_info_provider.dart';
|
||||||
import 'package:hiddify/core/preferences/general_preferences.dart';
|
|
||||||
import 'package:native_dio_adapter/native_dio_adapter.dart';
|
|
||||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||||
|
|
||||||
part 'http_client_provider.g.dart';
|
part 'http_client_provider.g.dart';
|
||||||
@@ -20,9 +16,11 @@ Dio httpClient(HttpClientRef ref) {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
final debug = ref.read(debugModeNotifierProvider);
|
// https://github.com/dart-lang/http/issues/1047
|
||||||
if (debug && (Platform.isAndroid || Platform.isIOS || Platform.isMacOS)) {
|
// https://github.com/cfug/dio/issues/2042
|
||||||
dio.httpClientAdapter = NativeAdapter();
|
// final debug = ref.read(debugModeNotifierProvider);
|
||||||
}
|
// if (debug && (Platform.isAndroid || Platform.isIOS || Platform.isMacOS)) {
|
||||||
|
// dio.httpClientAdapter = NativeAdapter();
|
||||||
|
// }
|
||||||
return dio;
|
return dio;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user