diff --git a/lib/app.dart b/lib/app.dart index 919b0df23..27623b087 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -10,7 +10,6 @@ import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_gen/gen_l10n/app_localizations.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; import 'package:logging/logging.dart'; -import 'package:photos/core/network.dart'; import 'package:photos/ente_theme_data.dart'; import 'package:photos/l10n/l10n.dart'; import 'package:photos/services/app_lifecycle_service.dart'; @@ -58,7 +57,6 @@ class _EnteAppState extends State with WidgetsBindingObserver { darkTheme: dartTheme, home: EnteApp._homeWidget, debugShowCheckedModeBanner: false, - navigatorKey: Network.instance.getAlice().getNavigatorKey(), builder: EasyLoading.init(), supportedLocales: L10n.all, localizationsDelegates: const [ @@ -77,7 +75,6 @@ class _EnteAppState extends State with WidgetsBindingObserver { darkTheme: darkThemeData, home: EnteApp._homeWidget, debugShowCheckedModeBanner: false, - navigatorKey: Network.instance.getAlice().getNavigatorKey(), builder: EasyLoading.init(), supportedLocales: L10n.all, localizationsDelegates: const [ diff --git a/lib/core/network.dart b/lib/core/network.dart index a6a7d4d2a..aef529db3 100644 --- a/lib/core/network.dart +++ b/lib/core/network.dart @@ -1,11 +1,8 @@ // @dart=2.9 import 'dart:io'; - -import 'package:alice/alice.dart'; import 'package:dio/dio.dart'; import 'package:fk_user_agent/fk_user_agent.dart'; -import 'package:flutter/foundation.dart'; import 'package:package_info_plus/package_info_plus.dart'; import 'package:uuid/uuid.dart'; @@ -13,10 +10,8 @@ int kConnectTimeout = 15000; class Network { Dio _dio; - Alice _alice; Future init() async { - _alice = Alice(darkTheme: true, showNotification: kDebugMode); await FkUserAgent.init(); final packageInfo = await PackageInfo.fromPlatform(); _dio = Dio( @@ -30,7 +25,6 @@ class Network { ), ); _dio.interceptors.add(RequestIdInterceptor()); - _dio.interceptors.add(_alice.getDioInterceptor()); } Network._privateConstructor(); @@ -38,8 +32,6 @@ class Network { static Network instance = Network._privateConstructor(); Dio getDio() => _dio; - - Alice getAlice() => _alice; } class RequestIdInterceptor extends Interceptor { diff --git a/lib/ui/settings/app_version_widget.dart b/lib/ui/settings/app_version_widget.dart index 25ea8a931..757b4dc8e 100644 --- a/lib/ui/settings/app_version_widget.dart +++ b/lib/ui/settings/app_version_widget.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:package_info_plus/package_info_plus.dart'; -import 'package:photos/core/network.dart'; import 'package:photos/utils/dialog_util.dart'; class AppVersionWidget extends StatefulWidget { @@ -38,7 +37,6 @@ class _AppVersionWidgetState extends State { const Duration(milliseconds: kDummyDelayDurationInMilliseconds), ); await dialog.hide(); - Network.instance.getAlice().showInspector(); } } else { _consecutiveTaps = 1; diff --git a/lib/ui/settings/debug_section_widget.dart b/lib/ui/settings/debug_section_widget.dart index 2c9d48815..0743cf60c 100644 --- a/lib/ui/settings/debug_section_widget.dart +++ b/lib/ui/settings/debug_section_widget.dart @@ -4,7 +4,6 @@ import 'package:expandable/expandable.dart'; import 'package:flutter/material.dart'; import 'package:flutter_sodium/flutter_sodium.dart'; import 'package:photos/core/configuration.dart'; -import 'package:photos/core/network.dart'; import 'package:photos/ui/settings/common_settings.dart'; import 'package:photos/ui/settings/settings_section_title.dart'; import 'package:photos/ui/settings/settings_text_item.dart'; @@ -34,16 +33,6 @@ class DebugSectionWidget extends StatelessWidget { icon: Icons.navigate_next, ), ), - GestureDetector( - behavior: HitTestBehavior.translucent, - onTap: () async { - Network.instance.getAlice().showInspector(); - }, - child: const SettingsTextItem( - text: "Network requests", - icon: Icons.navigate_next, - ), - ) ], ); } diff --git a/pubspec.lock b/pubspec.lock index 061b3b37d..1a855fc11 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -8,15 +8,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.1.0" - alice: - dependency: "direct main" - description: - path: "." - ref: HEAD - resolved-ref: "42c97aebbea93d1944a199b453b41bbed1f3013a" - url: "https://github.com/jhomlala/alice.git" - source: git - version: "0.2.5" animate_do: dependency: "direct main" description: @@ -52,13 +43,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.0" - better_player: - dependency: transitive - description: - name: better_player - url: "https://pub.dartlang.org" - source: hosted - version: "0.0.81" bip39: dependency: "direct main" description: @@ -115,13 +99,6 @@ packages: relative: true source: path version: "1.2.2" - chopper: - dependency: transitive - description: - name: chopper - url: "https://pub.dartlang.org" - source: hosted - version: "4.0.5" clock: dependency: transitive description: @@ -562,13 +539,6 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_widget_from_html_core: - dependency: transitive - description: - name: flutter_widget_from_html_core - url: "https://pub.dartlang.org" - source: hosted - version: "0.8.5+3" flutter_windowmanager: dependency: "direct main" description: @@ -590,13 +560,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "8.0.9" - fwfh_text_style: - dependency: transitive - description: - name: fwfh_text_style - url: "https://pub.dartlang.org" - source: hosted - version: "2.7.3+2" google_nav_bar: dependency: "direct main" description: @@ -795,13 +758,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.2" - open_file: - dependency: transitive - description: - name: open_file - url: "https://pub.dartlang.org" - source: hosted - version: "3.2.1" open_mail_app: dependency: "direct main" description: @@ -942,20 +898,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.11.1" - permission_handler: - dependency: transitive - description: - name: permission_handler - url: "https://pub.dartlang.org" - source: hosted - version: "8.3.0" - permission_handler_platform_interface: - dependency: transitive - description: - name: permission_handler_platform_interface - url: "https://pub.dartlang.org" - source: hosted - version: "3.7.0" petitparser: dependency: transitive description: @@ -1047,13 +989,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.2.3" - sensors: - dependency: transitive - description: - name: sensors - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.3" sentry: dependency: "direct main" description: @@ -1068,13 +1003,6 @@ packages: relative: true source: path version: "6.5.1" - share: - dependency: transitive - description: - name: share - url: "https://pub.dartlang.org" - source: hosted - version: "2.0.4" share_plus: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index f17caf6ee..4c63d2c90 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,8 +18,6 @@ environment: dependencies: adaptive_theme: ^3.1.0 - alice: - git: "https://github.com/jhomlala/alice.git" animate_do: ^2.0.0 archive: ^3.1.2 background_fetch: ^1.0.1