diff --git a/lib/app/view/app.dart b/lib/app/view/app.dart index b8cb82629..97609f957 100644 --- a/lib/app/view/app.dart +++ b/lib/app/view/app.dart @@ -13,7 +13,6 @@ import "package:ente_auth/onboarding/view/onboarding_page.dart"; import 'package:ente_auth/ui/home_page.dart'; import 'package:flutter/foundation.dart'; import "package:flutter/material.dart"; -import 'package:flutter_easyloading/flutter_easyloading.dart'; import "package:flutter_localizations/flutter_localizations.dart"; class App extends StatefulWidget { @@ -62,7 +61,6 @@ class _AppState extends State { theme: lightTheme, darkTheme: dartTheme, debugShowCheckedModeBanner: false, - builder: EasyLoading.init(), supportedLocales: AppLocalizations.supportedLocales, localizationsDelegates: const [ AppLocalizations.delegate, @@ -80,7 +78,6 @@ class _AppState extends State { theme: lightThemeData, darkTheme: darkThemeData, debugShowCheckedModeBanner: false, - builder: EasyLoading.init(), supportedLocales: AppLocalizations.supportedLocales, localizationsDelegates: const [ AppLocalizations.delegate, diff --git a/lib/utils/toast_util.dart b/lib/utils/toast_util.dart index 972e9971a..a9f0392c2 100644 --- a/lib/utils/toast_util.dart +++ b/lib/utils/toast_util.dart @@ -1,8 +1,5 @@ -import 'dart:io'; - import 'package:ente_auth/ente_theme_data.dart'; import 'package:flutter/material.dart'; -import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:fluttertoast/fluttertoast.dart'; Future showToast( @@ -11,31 +8,16 @@ Future showToast( toastLength = Toast.LENGTH_LONG, iOSDismissOnTap = true, }) async { - if (Platform.isAndroid) { - await Fluttertoast.cancel(); - return Fluttertoast.showToast( - msg: message, - toastLength: toastLength, - gravity: ToastGravity.BOTTOM, - timeInSecForIosWeb: 1, - backgroundColor: Theme.of(context).colorScheme.toastBackgroundColor, - textColor: Theme.of(context).colorScheme.toastTextColor, - fontSize: 16.0, - ); - } else { - EasyLoading.instance - ..backgroundColor = Theme.of(context).colorScheme.toastBackgroundColor - ..indicatorColor = Theme.of(context).colorScheme.toastBackgroundColor - ..textColor = Theme.of(context).colorScheme.toastTextColor - ..userInteractions = true - ..loadingStyle = EasyLoadingStyle.custom; - return EasyLoading.showToast( - message, - duration: Duration(seconds: (toastLength == Toast.LENGTH_LONG ? 5 : 2)), - toastPosition: EasyLoadingToastPosition.bottom, - dismissOnTap: iOSDismissOnTap, - ); - } + await Fluttertoast.cancel(); + return Fluttertoast.showToast( + msg: message, + toastLength: toastLength, + gravity: ToastGravity.BOTTOM, + timeInSecForIosWeb: 1, + backgroundColor: Theme.of(context).colorScheme.toastBackgroundColor, + textColor: Theme.of(context).colorScheme.toastTextColor, + fontSize: 16.0, + ); } Future showShortToast(context, String message) { diff --git a/pubspec.lock b/pubspec.lock index 8a956fae1..93ec4ae9b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -384,13 +384,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "8.0.1" - flutter_easyloading: - dependency: "direct main" - description: - name: flutter_easyloading - url: "https://pub.dartlang.org" - source: hosted - version: "3.0.5" flutter_email_sender: dependency: "direct main" description: @@ -494,13 +487,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "6.2.0" - flutter_spinkit: - dependency: transitive - description: - name: flutter_spinkit - url: "https://pub.dartlang.org" - source: hosted - version: "5.1.0" flutter_test: dependency: "direct dev" description: flutter @@ -524,7 +510,7 @@ packages: name: fluttertoast url: "https://pub.dartlang.org" source: hosted - version: "8.0.9" + version: "8.1.1" frontend_server_client: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 2151b07c4..a1cad9001 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -46,7 +46,7 @@ dependencies: # sentry_flutter: # path: thirdparty/sentry-dart/flutter json_annotation: ^4.5.0 - fluttertoast: ^8.0.6 + fluttertoast: ^8.1.1 google_nav_bar: ^5.0.5 #supported http: ^0.13.4 move_to_background: ^1.0.2 @@ -58,7 +58,6 @@ dependencies: share_plus: ^4.4.0 package_info_plus: ^1.0.1 shared_preferences: ^2.0.5 - flutter_easyloading: ^3.0.5 uuid: ^3.0.4 url_launcher: ^6.1.5 logging: ^1.0.1