mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2024-11-10 19:03:12 +00:00
refactor: Remove REST logger
This commit is contained in:
parent
4445b5cba1
commit
100ad5c367
|
@ -4,9 +4,6 @@ import 'dart:io';
|
||||||
|
|
||||||
import 'package:dio/dio.dart';
|
import 'package:dio/dio.dart';
|
||||||
import 'package:dio/io.dart';
|
import 'package:dio/io.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:pretty_dio_logger/pretty_dio_logger.dart';
|
|
||||||
import 'package:selfprivacy/config/config.dart';
|
|
||||||
import 'package:selfprivacy/config/get_it_config.dart';
|
import 'package:selfprivacy/config/get_it_config.dart';
|
||||||
import 'package:selfprivacy/logic/models/console_log.dart';
|
import 'package:selfprivacy/logic/models/console_log.dart';
|
||||||
import 'package:selfprivacy/utils/app_logger.dart';
|
import 'package:selfprivacy/utils/app_logger.dart';
|
||||||
|
@ -16,11 +13,6 @@ abstract class RestApiMap {
|
||||||
|
|
||||||
Future<Dio> getClient({final BaseOptions? customOptions}) async {
|
Future<Dio> getClient({final BaseOptions? customOptions}) async {
|
||||||
final Dio dio = Dio(customOptions ?? (await options));
|
final Dio dio = Dio(customOptions ?? (await options));
|
||||||
if (hasLogger && config.shouldDebugPrint) {
|
|
||||||
dio.interceptors.add(
|
|
||||||
PrettyDioLogger(logPrint: (final object) => debugPrint('$object')),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
dio.interceptors.add(ConsoleInterceptor());
|
dio.interceptors.add(ConsoleInterceptor());
|
||||||
dio.httpClientAdapter = IOHttpClientAdapter(
|
dio.httpClientAdapter = IOHttpClientAdapter(
|
||||||
createHttpClient: () {
|
createHttpClient: () {
|
||||||
|
|
Loading…
Reference in a new issue