From 2f4c3c77772ec4a78048c385e8878e89b24edf20 Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Mon, 16 Jun 2025 12:58:13 +0530 Subject: [PATCH] feat: upgrade deps (incomplete) --- .../core/error-reporting/super_logging.dart | 2 - mobile/lib/ente_theme_data.dart | 22 ++-- mobile/lib/module/download/manager.dart | 2 +- .../face_ml/feedback/cluster_feedback.dart | 2 +- mobile/lib/ui/account/recovery_key_page.dart | 6 +- mobile/lib/ui/account/sessions_page.dart | 4 +- .../ui/account/two_factor_recovery_page.dart | 5 +- .../lib/ui/account/two_factor_setup_page.dart | 6 +- mobile/lib/ui/collections/album/row_item.dart | 4 +- .../collections/button/archived_button.dart | 2 +- .../ui/collections/button/hidden_button.dart | 2 +- .../ui/collections/button/trash_button.dart | 2 +- .../button/uncategorized_button.dart | 2 +- .../ui/components/notification_widget.dart | 2 +- .../lib/ui/home/grant_permissions_widget.dart | 2 +- mobile/lib/ui/home/landing_page_widget.dart | 5 +- mobile/lib/ui/home/loading_photos_widget.dart | 4 +- .../ui/home/memories/full_screen_memory.dart | 8 +- .../ui/home/memories/memory_cover_widget.dart | 4 +- mobile/lib/ui/map/map_view.dart | 2 +- mobile/lib/ui/payment/payment_web_page.dart | 3 +- .../ui/payment/subscription_plan_widget.dart | 2 +- .../lib/ui/settings/about_section_widget.dart | 2 +- .../ui/settings/account_section_widget.dart | 2 +- .../backup/backup_folder_selection_page.dart | 9 +- .../ui/settings/backup/backup_item_card.dart | 2 +- .../settings/backup/backup_status_screen.dart | 4 +- .../lock_screen_confirm_password.dart | 8 +- .../lock_screen/lock_screen_confirm_pin.dart | 8 +- .../lock_screen/lock_screen_password.dart | 8 +- .../settings/lock_screen/lock_screen_pin.dart | 8 +- .../ui/settings/widget_settings_screen.dart | 15 ++- .../widgets/memories_widget_settings.dart | 15 ++- mobile/lib/ui/tabs/home_widget.dart | 2 +- mobile/lib/ui/tabs/nav_bar.dart | 4 +- mobile/lib/ui/tabs/user_collections_tab.dart | 2 +- mobile/lib/ui/tools/deduplicate_page.dart | 4 +- .../ui/tools/editor/export_video_result.dart | 4 +- .../ui/tools/editor/image_editor_page.dart | 21 ++-- .../ui/tools/editor/video_editor_page.dart | 2 +- mobile/lib/ui/tools/free_space_page.dart | 6 +- mobile/lib/ui/tools/lock_screen.dart | 8 +- .../actions/album_selection_overlay_bar.dart | 2 +- .../file_selection_actions_widget.dart | 1 - .../actions/file_selection_overlay_bar.dart | 2 +- .../lib/ui/viewer/file/exif_info_dialog.dart | 5 +- mobile/lib/ui/viewer/file/file_app_bar.dart | 4 +- .../lib/ui/viewer/file/file_bottom_bar.dart | 4 +- .../lib/ui/viewer/file/file_icons_widget.dart | 4 +- .../play_pause_button.dart | 2 +- mobile/lib/ui/viewer/file/video_widget.dart | 2 +- .../file/video_widget_media_kit_common.dart | 4 +- .../ui/viewer/file/video_widget_native.dart | 8 +- mobile/lib/ui/viewer/file/zoomable_image.dart | 2 +- .../file_details/location_tags_widget.dart | 2 +- .../gallery/collect_photos_card_widget.dart | 10 +- .../component/gallery_file_widget.dart | 4 +- mobile/lib/ui/viewer/gallery/empty_state.dart | 2 +- .../gallery/gallery_app_bar_widget.dart | 2 +- .../applied_filters_for_appbar.dart | 2 +- .../location/update_location_data_widget.dart | 4 +- .../lib/ui/viewer/people/cluster_app_bar.dart | 2 +- .../lib/ui/viewer/people/people_app_bar.dart | 2 +- .../people/person_cluster_suggestion.dart | 2 +- .../viewer/search_tab/locations_section.dart | 11 +- .../ui/viewer/search_tab/magic_section.dart | 8 +- .../ui/viewer/search_tab/moments_section.dart | 10 +- .../ui/viewer/search_tab/people_section.dart | 4 +- mobile/lib/utils/delete_file_util.dart | 2 +- mobile/lib/utils/email_util.dart | 8 +- mobile/lib/utils/share_util.dart | 39 +++--- mobile/pubspec.lock | 114 +++++++++--------- 72 files changed, 262 insertions(+), 233 deletions(-) diff --git a/mobile/lib/core/error-reporting/super_logging.dart b/mobile/lib/core/error-reporting/super_logging.dart index 31cd3d9137..50950d342f 100644 --- a/mobile/lib/core/error-reporting/super_logging.dart +++ b/mobile/lib/core/error-reporting/super_logging.dart @@ -1,5 +1,3 @@ -library super_logging; - import 'dart:async'; import 'dart:collection'; import 'dart:core'; diff --git a/mobile/lib/ente_theme_data.dart b/mobile/lib/ente_theme_data.dart index c7ed51640b..b730f74105 100644 --- a/mobile/lib/ente_theme_data.dart +++ b/mobile/lib/ente_theme_data.dart @@ -206,7 +206,7 @@ TextTheme _buildTextTheme(Color textColor) { fontWeight: FontWeight.w500, ), bodySmall: TextStyle( - color: textColor.withOpacity(0.6), + color: textColor.withValues(alpha: 0.6), fontSize: 14, fontWeight: FontWeight.w500, ), @@ -278,7 +278,7 @@ extension CustomColorScheme on ColorScheme { : const Color.fromRGBO(48, 48, 48, 0.5); Color get iconColor => brightness == Brightness.light - ? const Color.fromRGBO(0, 0, 0, 1).withOpacity(0.75) + ? const Color.fromRGBO(0, 0, 0, 1).withValues(alpha: 0.75) : const Color.fromRGBO(255, 255, 255, 1); Color get bgColorForQuestions => brightness == Brightness.light @@ -289,7 +289,7 @@ extension CustomColorScheme on ColorScheme { Color get cupertinoPickerTopColor => brightness == Brightness.light ? const Color.fromARGB(255, 238, 238, 238) - : const Color.fromRGBO(255, 255, 255, 1).withOpacity(0.1); + : const Color.fromRGBO(255, 255, 255, 1).withValues(alpha: 0.1); Color get stepProgressUnselectedColor => brightness == Brightness.light ? const Color.fromRGBO(196, 196, 196, 0.6) @@ -300,20 +300,20 @@ extension CustomColorScheme on ColorScheme { : const Color.fromRGBO(20, 20, 20, 1); Color get galleryThumbDrawColor => brightness == Brightness.light - ? const Color.fromRGBO(0, 0, 0, 1).withOpacity(0.8) - : const Color.fromRGBO(255, 255, 255, 1).withOpacity(0.5); + ? const Color.fromRGBO(0, 0, 0, 1).withValues(alpha: 0.8) + : const Color.fromRGBO(255, 255, 255, 1).withValues(alpha: 0.5); Color get backupEnabledBgColor => brightness == Brightness.light ? const Color.fromRGBO(230, 230, 230, 0.95) : const Color.fromRGBO(10, 40, 40, 0.3); Color get dotsIndicatorActiveColor => brightness == Brightness.light - ? const Color.fromRGBO(0, 0, 0, 1).withOpacity(0.5) - : const Color.fromRGBO(255, 255, 255, 1).withOpacity(0.5); + ? const Color.fromRGBO(0, 0, 0, 1).withValues(alpha: 0.5) + : const Color.fromRGBO(255, 255, 255, 1).withValues(alpha: 0.5); Color get dotsIndicatorInactiveColor => brightness == Brightness.light - ? const Color.fromRGBO(0, 0, 0, 1).withOpacity(0.12) - : const Color.fromRGBO(255, 255, 255, 1).withOpacity(0.12); + ? const Color.fromRGBO(0, 0, 0, 1).withValues(alpha: 0.12) + : const Color.fromRGBO(255, 255, 255, 1).withValues(alpha: 0.12); Color get toastTextColor => brightness == Brightness.light ? const Color.fromRGBO(255, 255, 255, 1) @@ -336,8 +336,8 @@ extension CustomColorScheme on ColorScheme { : const Color.fromRGBO(150, 150, 150, 1); Color get searchResultsBackgroundColor => brightness == Brightness.light - ? Colors.black.withOpacity(0.32) - : Colors.black.withOpacity(0.64); + ? Colors.black.withValues(alpha: 0.32) + : Colors.black.withValues(alpha: 0.64); EnteTheme get enteTheme => brightness == Brightness.light ? lightTheme : darkTheme; diff --git a/mobile/lib/module/download/manager.dart b/mobile/lib/module/download/manager.dart index 47cacc7d69..fa4c4f3166 100644 --- a/mobile/lib/module/download/manager.dart +++ b/mobile/lib/module/download/manager.dart @@ -168,7 +168,7 @@ class DownloadManager { final existingSize = await baseFile.length(); if (existingSize == task.totalBytes) { _logger.info( - 'Download already exists for ${task.filename} (${existingSize}/${task.totalBytes} bytes)', + 'Download already exists for ${task.filename} ($existingSize/${task.totalBytes} bytes)', ); task = task.copyWith( status: DownloadStatus.completed, diff --git a/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart b/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart index 8742970e33..efcf76a62a 100644 --- a/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart +++ b/mobile/lib/services/machine_learning/face_ml/feedback/cluster_feedback.dart @@ -57,7 +57,7 @@ class ClusterFeedbackService { /// 1. clusterID: the ID of the cluster /// 2. distance: the distance between the person's cluster and the suggestion /// 3. bool: whether the suggestion was found using the mean (true) or the median (false) - /// 4. List: the files in the cluster + /// 4. `List`: the files in the cluster Future> getSuggestionForPerson( PersonEntity person, { bool extremeFilesFirst = true, diff --git a/mobile/lib/ui/account/recovery_key_page.dart b/mobile/lib/ui/account/recovery_key_page.dart index 1d4d9a57d7..e1c13780c1 100644 --- a/mobile/lib/ui/account/recovery_key_page.dart +++ b/mobile/lib/ui/account/recovery_key_page.dart @@ -249,7 +249,11 @@ class _RecoveryKeyPageState extends State { } _recoveryKeyFile.writeAsStringSync(recoveryKey); - await Share.shareXFiles([XFile(_recoveryKeyFile.path)]); + await SharePlus.instance.share( + ShareParams( + files: [XFile(_recoveryKeyFile.path)], + ), + ); Future.delayed(const Duration(milliseconds: 500), () { if (mounted) { setState(() { diff --git a/mobile/lib/ui/account/sessions_page.dart b/mobile/lib/ui/account/sessions_page.dart index ed3c48407b..40fc8453c8 100644 --- a/mobile/lib/ui/account/sessions_page.dart +++ b/mobile/lib/ui/account/sessions_page.dart @@ -83,7 +83,7 @@ class _SessionsPageState extends State { color: Theme.of(context) .colorScheme .onSurface - .withOpacity(0.8), + .withValues(alpha: 0.8), fontSize: 14, ), ), @@ -96,7 +96,7 @@ class _SessionsPageState extends State { color: Theme.of(context) .colorScheme .onSurface - .withOpacity(0.8), + .withValues(alpha: 0.8), fontSize: 12, ), ), diff --git a/mobile/lib/ui/account/two_factor_recovery_page.dart b/mobile/lib/ui/account/two_factor_recovery_page.dart index 8beea1da75..8ce492475a 100644 --- a/mobile/lib/ui/account/two_factor_recovery_page.dart +++ b/mobile/lib/ui/account/two_factor_recovery_page.dart @@ -101,8 +101,9 @@ class _TwoFactorRecoveryPageState extends State { style: TextStyle( decoration: TextDecoration.underline, fontSize: 12, - color: - getEnteColorScheme(context).textBase.withOpacity(0.9), + color: getEnteColorScheme(context) + .textBase + .withValues(alpha: 0.9), ), ), ), diff --git a/mobile/lib/ui/account/two_factor_setup_page.dart b/mobile/lib/ui/account/two_factor_setup_page.dart index 5817b4afed..b1eb09d4a8 100644 --- a/mobile/lib/ui/account/two_factor_setup_page.dart +++ b/mobile/lib/ui/account/two_factor_setup_page.dart @@ -160,14 +160,14 @@ class _TwoFactorSetupPageState extends State padding: const EdgeInsets.only(left: 10, right: 10), child: Container( padding: const EdgeInsets.all(16), - color: textColor.withOpacity(0.1), + color: textColor.withValues(alpha: 0.1), child: Center( child: Text( widget.secretCode, style: TextStyle( fontSize: 15, fontFeatures: const [FontFeature.tabularFigures()], - color: textColor.withOpacity(0.7), + color: textColor.withValues(alpha: 0.7), ), ), ), @@ -176,7 +176,7 @@ class _TwoFactorSetupPageState extends State const Padding(padding: EdgeInsets.all(6)), Text( S.of(context).tapToCopy, - style: TextStyle(color: textColor.withOpacity(0.5)), + style: TextStyle(color: textColor.withValues(alpha: 0.5)), ), ], ), diff --git a/mobile/lib/ui/collections/album/row_item.dart b/mobile/lib/ui/collections/album/row_item.dart index 5467a27a53..490a43d8be 100644 --- a/mobile/lib/ui/collections/album/row_item.dart +++ b/mobile/lib/ui/collections/album/row_item.dart @@ -97,8 +97,8 @@ class AlbumRowItemWidget extends StatelessWidget { child: isSelected ? ColorFiltered( colorFilter: ColorFilter.mode( - Colors.black.withOpacity( - 0.4, + Colors.black.withValues( + alpha: 0.4, ), BlendMode.darken, ), diff --git a/mobile/lib/ui/collections/button/archived_button.dart b/mobile/lib/ui/collections/button/archived_button.dart index 6676d4dcc5..0b0e674334 100644 --- a/mobile/lib/ui/collections/button/archived_button.dart +++ b/mobile/lib/ui/collections/button/archived_button.dart @@ -28,7 +28,7 @@ class ArchivedCollectionsButton extends StatelessWidget { padding: const EdgeInsets.all(0), side: BorderSide( width: 0.5, - color: Theme.of(context).iconTheme.color!.withOpacity(0.24), + color: Theme.of(context).iconTheme.color!.withValues(alpha: 0.24), ), ), child: SizedBox( diff --git a/mobile/lib/ui/collections/button/hidden_button.dart b/mobile/lib/ui/collections/button/hidden_button.dart index 8172d3c6a2..77358e79e8 100644 --- a/mobile/lib/ui/collections/button/hidden_button.dart +++ b/mobile/lib/ui/collections/button/hidden_button.dart @@ -23,7 +23,7 @@ class HiddenCollectionsButtonWidget extends StatelessWidget { padding: const EdgeInsets.all(0), side: BorderSide( width: 0.5, - color: Theme.of(context).iconTheme.color!.withOpacity(0.24), + color: Theme.of(context).iconTheme.color!.withValues(alpha: 0.24), ), ), child: SizedBox( diff --git a/mobile/lib/ui/collections/button/trash_button.dart b/mobile/lib/ui/collections/button/trash_button.dart index b6e71006fc..96fec3f54c 100644 --- a/mobile/lib/ui/collections/button/trash_button.dart +++ b/mobile/lib/ui/collections/button/trash_button.dart @@ -52,7 +52,7 @@ class _TrashSectionButtonState extends State { padding: const EdgeInsets.all(0), side: BorderSide( width: 0.5, - color: Theme.of(context).iconTheme.color!.withOpacity(0.24), + color: Theme.of(context).iconTheme.color!.withValues(alpha: 0.24), ), ), child: SizedBox( diff --git a/mobile/lib/ui/collections/button/uncategorized_button.dart b/mobile/lib/ui/collections/button/uncategorized_button.dart index 29800df76e..447be85eee 100644 --- a/mobile/lib/ui/collections/button/uncategorized_button.dart +++ b/mobile/lib/ui/collections/button/uncategorized_button.dart @@ -33,7 +33,7 @@ class UnCategorizedCollections extends StatelessWidget { padding: const EdgeInsets.all(0), side: BorderSide( width: 0.5, - color: Theme.of(context).iconTheme.color!.withOpacity(0.24), + color: Theme.of(context).iconTheme.color!.withValues(alpha: 0.24), ), ), child: SizedBox( diff --git a/mobile/lib/ui/components/notification_widget.dart b/mobile/lib/ui/components/notification_widget.dart index 152f9044d3..88c8f98624 100644 --- a/mobile/lib/ui/components/notification_widget.dart +++ b/mobile/lib/ui/components/notification_widget.dart @@ -60,7 +60,7 @@ class NotificationWidget extends StatelessWidget { subTextStyle = textTheme.miniMuted; strokeColorScheme = colorScheme; boxShadow = [ - BoxShadow(color: Colors.black.withOpacity(0.25), blurRadius: 1), + BoxShadow(color: Colors.black.withValues(alpha: 0.25), blurRadius: 1), ]; break; case NotificationType.goldenBanner: diff --git a/mobile/lib/ui/home/grant_permissions_widget.dart b/mobile/lib/ui/home/grant_permissions_widget.dart index 84aebd2b21..a9801cb38d 100644 --- a/mobile/lib/ui/home/grant_permissions_widget.dart +++ b/mobile/lib/ui/home/grant_permissions_widget.dart @@ -44,7 +44,7 @@ class _GrantPermissionsWidgetState extends State { isLightMode ? Image.asset( 'assets/loading_photos_background.png', - color: Colors.white.withOpacity(0.4), + color: Colors.white.withValues(alpha: 0.4), colorBlendMode: BlendMode.modulate, ) : Image.asset( diff --git a/mobile/lib/ui/home/landing_page_widget.dart b/mobile/lib/ui/home/landing_page_widget.dart index bdc1e8a03e..709124847b 100644 --- a/mobile/lib/ui/home/landing_page_widget.dart +++ b/mobile/lib/ui/home/landing_page_widget.dart @@ -350,7 +350,10 @@ class FeatureItemWidget extends StatelessWidget { subText, textAlign: TextAlign.center, style: TextStyle( - color: Theme.of(context).colorScheme.onSurface.withOpacity(0.5), + color: Theme.of(context) + .colorScheme + .onSurface + .withValues(alpha: 0.5), fontSize: 16, ), ), diff --git a/mobile/lib/ui/home/loading_photos_widget.dart b/mobile/lib/ui/home/loading_photos_widget.dart index d4eeb92650..12beccafb2 100644 --- a/mobile/lib/ui/home/loading_photos_widget.dart +++ b/mobile/lib/ui/home/loading_photos_widget.dart @@ -124,12 +124,12 @@ class _LoadingPhotosWidgetState extends State { isLightMode ? Image.asset( 'assets/loading_photos_background.png', - color: Colors.white.withOpacity(0.5), + color: Colors.white.withValues(alpha: 0.5), colorBlendMode: BlendMode.modulate, ) : Image.asset( 'assets/loading_photos_background_dark.png', - color: Colors.white.withOpacity(0.25), + color: Colors.white.withValues(alpha: 0.25), colorBlendMode: BlendMode.modulate, ), Column( diff --git a/mobile/lib/ui/home/memories/full_screen_memory.dart b/mobile/lib/ui/home/memories/full_screen_memory.dart index 7a09c80f2a..5b82bb919f 100644 --- a/mobile/lib/ui/home/memories/full_screen_memory.dart +++ b/mobile/lib/ui/home/memories/full_screen_memory.dart @@ -185,7 +185,7 @@ class _FullScreenMemoryState extends State { currentStep: value + 1, size: 2, selectedColor: Colors.white, //same for both themes - unselectedColor: Colors.white.withOpacity(0.4), + unselectedColor: Colors.white.withValues(alpha: 0.4), ) : const SizedBox.shrink(), const SizedBox( @@ -217,8 +217,8 @@ class _FullScreenMemoryState extends State { begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ - Colors.black.withOpacity(0.6), - Colors.black.withOpacity(0.5), + Colors.black.withValues(alpha: 0.6), + Colors.black.withValues(alpha: 0.5), Colors.transparent, ], stops: const [0, 0.6, 1], @@ -440,7 +440,7 @@ class BottomGradient extends StatelessWidget { begin: Alignment.bottomCenter, end: Alignment.topCenter, colors: [ - Colors.black.withOpacity(0.5), //same for both themes + Colors.black.withValues(alpha: 0.5), //same for both themes Colors.transparent, ], stops: const [0, 0.8], diff --git a/mobile/lib/ui/home/memories/memory_cover_widget.dart b/mobile/lib/ui/home/memories/memory_cover_widget.dart index 55f8db652c..ef5b28e049 100644 --- a/mobile/lib/ui/home/memories/memory_cover_widget.dart +++ b/mobile/lib/ui/home/memories/memory_cover_widget.dart @@ -112,7 +112,7 @@ class _MemoryCoverWidgetState extends State { decoration: BoxDecoration( gradient: LinearGradient( colors: [ - Colors.black.withOpacity(0.5), + Colors.black.withValues(alpha: 0.5), Colors.transparent, ], stops: const [0, 1], @@ -163,7 +163,7 @@ class _MemoryCoverWidgetState extends State { decoration: BoxDecoration( gradient: LinearGradient( colors: [ - Colors.black.withOpacity(0.5), + Colors.black.withValues(alpha: 0.5), Colors.transparent, ], stops: const [0, 1], diff --git a/mobile/lib/ui/map/map_view.dart b/mobile/lib/ui/map/map_view.dart index e25319b133..77aa791272 100644 --- a/mobile/lib/ui/map/map_view.dart +++ b/mobile/lib/ui/map/map_view.dart @@ -96,7 +96,7 @@ class _MapViewState extends State { ), ), onPositionChanged: (position, hasGesture) { - if (position.bounds != null) { + if (position.pixelBounds != null) { onChange(position.bounds!); } }, diff --git a/mobile/lib/ui/payment/payment_web_page.dart b/mobile/lib/ui/payment/payment_web_page.dart index 23b1b66a74..6863697f1e 100644 --- a/mobile/lib/ui/payment/payment_web_page.dart +++ b/mobile/lib/ui/payment/payment_web_page.dart @@ -1,6 +1,5 @@ import 'dart:io'; -import 'package:collection/collection.dart' show IterableNullableExtension; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_inappwebview/flutter_inappwebview.dart'; @@ -110,7 +109,7 @@ class _PaymentWebPageState extends State { }, ), ), - ].whereNotNull().toList(), + ].nonNulls.toList(), ), ), ); diff --git a/mobile/lib/ui/payment/subscription_plan_widget.dart b/mobile/lib/ui/payment/subscription_plan_widget.dart index 3a269ec2b5..52c4b925ba 100644 --- a/mobile/lib/ui/payment/subscription_plan_widget.dart +++ b/mobile/lib/ui/payment/subscription_plan_widget.dart @@ -60,7 +60,7 @@ class _SubscriptionPlanWidgetState extends State { : null, boxShadow: [ BoxShadow( - color: Colors.black.withOpacity(0.08), + color: Colors.black.withValues(alpha: 0.08), offset: const Offset(0, 4), blurRadius: 4, ), diff --git a/mobile/lib/ui/settings/about_section_widget.dart b/mobile/lib/ui/settings/about_section_widget.dart index 7ca9397274..decbbf023b 100644 --- a/mobile/lib/ui/settings/about_section_widget.dart +++ b/mobile/lib/ui/settings/about_section_widget.dart @@ -77,7 +77,7 @@ class AboutSectionWidget extends StatelessWidget { updateService.getLatestVersionInfo(), ); }, - barrierColor: Colors.black.withOpacity(0.85), + barrierColor: Colors.black.withValues(alpha: 0.85), ); } else { showShortToast( diff --git a/mobile/lib/ui/settings/account_section_widget.dart b/mobile/lib/ui/settings/account_section_widget.dart index a137349639..cd97cf2afa 100644 --- a/mobile/lib/ui/settings/account_section_widget.dart +++ b/mobile/lib/ui/settings/account_section_widget.dart @@ -71,7 +71,7 @@ class AccountSectionWidget extends StatelessWidget { builder: (BuildContext context) { return const ChangeEmailDialog(); }, - barrierColor: Colors.black.withOpacity(0.85), + barrierColor: Colors.black.withValues(alpha: 0.85), barrierDismissible: false, ); } diff --git a/mobile/lib/ui/settings/backup/backup_folder_selection_page.dart b/mobile/lib/ui/settings/backup/backup_folder_selection_page.dart index 3eea0c2e7a..896be6e15b 100644 --- a/mobile/lib/ui/settings/backup/backup_folder_selection_page.dart +++ b/mobile/lib/ui/settings/backup/backup_folder_selection_page.dart @@ -271,8 +271,11 @@ class _BackupFolderSelectionPageState extends State { final t = dragAnimation.value; final elevation = lerpDouble(0, 8, t)!; final themeColor = Theme.of(context).colorScheme.onSurface; - final color = - Color.lerp(themeColor, themeColor.withOpacity(0.8), t); + final color = Color.lerp( + themeColor, + themeColor.withValues(alpha: 0.8), + t, + ); return SizeFadeTransition( sizeFraction: 0.7, curve: Curves.easeInOut, @@ -359,7 +362,7 @@ class _BackupFolderSelectionPageState extends State { : Theme.of(context) .colorScheme .onSurface - .withOpacity(0.7), + .withValues(alpha: 0.7), ), overflow: TextOverflow.ellipsis, maxLines: 2, diff --git a/mobile/lib/ui/settings/backup/backup_item_card.dart b/mobile/lib/ui/settings/backup/backup_item_card.dart index 8dd2930c16..1c5f4fd2f9 100644 --- a/mobile/lib/ui/settings/backup/backup_item_card.dart +++ b/mobile/lib/ui/settings/backup/backup_item_card.dart @@ -77,7 +77,7 @@ class _BackupItemCardState extends State { decoration: BoxDecoration( borderRadius: BorderRadius.circular(4), border: Border.all( - color: colorScheme.fillFaint.withOpacity(0.08), + color: colorScheme.fillFaint.withValues(alpha: 0.08), width: 1, ), ), diff --git a/mobile/lib/ui/settings/backup/backup_status_screen.dart b/mobile/lib/ui/settings/backup/backup_status_screen.dart index 82471ef137..ed7865009e 100644 --- a/mobile/lib/ui/settings/backup/backup_status_screen.dart +++ b/mobile/lib/ui/settings/backup/backup_status_screen.dart @@ -138,8 +138,8 @@ class _BackupStatusScreenState extends State { fontSize: 16, height: 20 / 16, color: Theme.of(context).brightness == Brightness.light - ? const Color(0xFF000000).withOpacity(0.7) - : const Color(0xFFFFFFFF).withOpacity(0.7), + ? const Color(0xFF000000).withValues(alpha: 0.7) + : const Color(0xFFFFFFFF).withValues(alpha: 0.7), ), ), const SizedBox(height: 48), diff --git a/mobile/lib/ui/settings/lock_screen/lock_screen_confirm_password.dart b/mobile/lib/ui/settings/lock_screen/lock_screen_confirm_password.dart index 13f0442f7a..2d33cf69c5 100644 --- a/mobile/lib/ui/settings/lock_screen/lock_screen_confirm_password.dart +++ b/mobile/lib/ui/settings/lock_screen/lock_screen_confirm_password.dart @@ -117,10 +117,10 @@ class _LockScreenConfirmPasswordState extends State { shape: BoxShape.circle, gradient: LinearGradient( colors: [ - Colors.grey.shade500.withOpacity(0.2), - Colors.grey.shade50.withOpacity(0.1), - Colors.grey.shade400.withOpacity(0.2), - Colors.grey.shade300.withOpacity(0.4), + Colors.grey.shade500.withValues(alpha: 0.2), + Colors.grey.shade50.withValues(alpha: 0.1), + Colors.grey.shade400.withValues(alpha: 0.2), + Colors.grey.shade300.withValues(alpha: 0.4), ], begin: Alignment.topCenter, end: Alignment.bottomCenter, diff --git a/mobile/lib/ui/settings/lock_screen/lock_screen_confirm_pin.dart b/mobile/lib/ui/settings/lock_screen/lock_screen_confirm_pin.dart index ae3e04129c..d21aee66a8 100644 --- a/mobile/lib/ui/settings/lock_screen/lock_screen_confirm_pin.dart +++ b/mobile/lib/ui/settings/lock_screen/lock_screen_confirm_pin.dart @@ -101,10 +101,10 @@ class _LockScreenConfirmPinState extends State { shape: BoxShape.circle, gradient: LinearGradient( colors: [ - Colors.grey.shade500.withOpacity(0.2), - Colors.grey.shade50.withOpacity(0.1), - Colors.grey.shade400.withOpacity(0.2), - Colors.grey.shade300.withOpacity(0.4), + Colors.grey.shade500.withValues(alpha: 0.2), + Colors.grey.shade50.withValues(alpha: 0.1), + Colors.grey.shade400.withValues(alpha: 0.2), + Colors.grey.shade300.withValues(alpha: 0.4), ], begin: Alignment.topCenter, end: Alignment.bottomCenter, diff --git a/mobile/lib/ui/settings/lock_screen/lock_screen_password.dart b/mobile/lib/ui/settings/lock_screen/lock_screen_password.dart index 3c8c2cc330..b62e64c6f6 100644 --- a/mobile/lib/ui/settings/lock_screen/lock_screen_password.dart +++ b/mobile/lib/ui/settings/lock_screen/lock_screen_password.dart @@ -127,10 +127,10 @@ class _LockScreenPasswordState extends State { shape: BoxShape.circle, gradient: LinearGradient( colors: [ - Colors.grey.shade500.withOpacity(0.2), - Colors.grey.shade50.withOpacity(0.1), - Colors.grey.shade400.withOpacity(0.2), - Colors.grey.shade300.withOpacity(0.4), + Colors.grey.shade500.withValues(alpha: 0.2), + Colors.grey.shade50.withValues(alpha: 0.1), + Colors.grey.shade400.withValues(alpha: 0.2), + Colors.grey.shade300.withValues(alpha: 0.4), ], begin: Alignment.topCenter, end: Alignment.bottomCenter, diff --git a/mobile/lib/ui/settings/lock_screen/lock_screen_pin.dart b/mobile/lib/ui/settings/lock_screen/lock_screen_pin.dart index 039b9df242..7c37f9c6ac 100644 --- a/mobile/lib/ui/settings/lock_screen/lock_screen_pin.dart +++ b/mobile/lib/ui/settings/lock_screen/lock_screen_pin.dart @@ -178,10 +178,10 @@ class _LockScreenPinState extends State { shape: BoxShape.circle, gradient: LinearGradient( colors: [ - Colors.grey.shade500.withOpacity(0.2), - Colors.grey.shade50.withOpacity(0.1), - Colors.grey.shade400.withOpacity(0.2), - Colors.grey.shade300.withOpacity(0.4), + Colors.grey.shade500.withValues(alpha: 0.2), + Colors.grey.shade50.withValues(alpha: 0.1), + Colors.grey.shade400.withValues(alpha: 0.2), + Colors.grey.shade300.withValues(alpha: 0.4), ], begin: Alignment.topCenter, end: Alignment.bottomCenter, diff --git a/mobile/lib/ui/settings/widget_settings_screen.dart b/mobile/lib/ui/settings/widget_settings_screen.dart index c5d491397f..91a51db353 100644 --- a/mobile/lib/ui/settings/widget_settings_screen.dart +++ b/mobile/lib/ui/settings/widget_settings_screen.dart @@ -87,7 +87,10 @@ class WidgetSettingsScreen extends StatelessWidget { ), leadingIconWidget: SvgPicture.asset( "assets/icons/people-widget-icon.svg", - color: colorScheme.textBase, + colorFilter: ColorFilter.mode( + colorScheme.textBase, + BlendMode.srcIn, + ), ), menuItemColor: colorScheme.fillFaint, singleBorderRadius: 8, @@ -101,7 +104,10 @@ class WidgetSettingsScreen extends StatelessWidget { ), leadingIconWidget: SvgPicture.asset( "assets/icons/albums-widget-icon.svg", - color: colorScheme.textBase, + colorFilter: ColorFilter.mode( + colorScheme.textBase, + BlendMode.srcIn, + ), ), menuItemColor: colorScheme.fillFaint, singleBorderRadius: 8, @@ -115,7 +121,10 @@ class WidgetSettingsScreen extends StatelessWidget { ), leadingIconWidget: SvgPicture.asset( "assets/icons/memories-widget-icon.svg", - color: colorScheme.textBase, + colorFilter: ColorFilter.mode( + colorScheme.textBase, + BlendMode.srcIn, + ), ), menuItemColor: colorScheme.fillFaint, singleBorderRadius: 8, diff --git a/mobile/lib/ui/settings/widgets/memories_widget_settings.dart b/mobile/lib/ui/settings/widgets/memories_widget_settings.dart index 51a0d6310c..90c62c94ba 100644 --- a/mobile/lib/ui/settings/widgets/memories_widget_settings.dart +++ b/mobile/lib/ui/settings/widgets/memories_widget_settings.dart @@ -151,7 +151,10 @@ class _MemoriesWidgetSettingsState extends State { ), leadingIconWidget: SvgPicture.asset( "assets/icons/past-year-memory-icon.svg", - color: colorScheme.textBase, + colorFilter: ColorFilter.mode( + colorScheme.textBase, + BlendMode.srcIn, + ), ), menuItemColor: colorScheme.fillFaint, trailingWidget: ToggleSwitchWidget( @@ -174,7 +177,10 @@ class _MemoriesWidgetSettingsState extends State { ), leadingIconWidget: SvgPicture.asset( "assets/icons/memories-widget-icon.svg", - color: colorScheme.textBase, + colorFilter: ColorFilter.mode( + colorScheme.textBase, + BlendMode.srcIn, + ), ), menuItemColor: colorScheme.fillFaint, trailingWidget: ToggleSwitchWidget( @@ -198,7 +204,10 @@ class _MemoriesWidgetSettingsState extends State { ), leadingIconWidget: SvgPicture.asset( "assets/icons/smart-memory-icon.svg", - color: colorScheme.textBase, + colorFilter: ColorFilter.mode( + colorScheme.textBase, + BlendMode.srcIn, + ), ), menuItemColor: colorScheme.fillFaint, trailingWidget: ToggleSwitchWidget( diff --git a/mobile/lib/ui/tabs/home_widget.dart b/mobile/lib/ui/tabs/home_widget.dart index 6c0633f49d..222968d134 100644 --- a/mobile/lib/ui/tabs/home_widget.dart +++ b/mobile/lib/ui/tabs/home_widget.dart @@ -231,7 +231,7 @@ class _HomeWidgetState extends State { updateService.getLatestVersionInfo(), ); }, - barrierColor: Colors.black.withOpacity(0.85), + barrierColor: Colors.black.withValues(alpha: 0.85), ); updateService.resetUpdateAvailableShownTime(); } diff --git a/mobile/lib/ui/tabs/nav_bar.dart b/mobile/lib/ui/tabs/nav_bar.dart index e5f0d22c2d..c5feae0e5c 100644 --- a/mobile/lib/ui/tabs/nav_bar.dart +++ b/mobile/lib/ui/tabs/nav_bar.dart @@ -1,5 +1,3 @@ -library google_nav_bar; - import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import "package:photos/theme/effects.dart"; @@ -340,7 +338,7 @@ class _ButtonState extends State