Parcourir la source

Rename decrecated fields

Neeraj Gupta il y a 2 ans
Parent
commit
b5433d3f0d
42 fichiers modifiés avec 132 ajouts et 122 suppressions
  1. 1 1
      ios/Podfile.lock
  2. 11 11
      lib/ente_theme_data.dart
  3. 1 1
      lib/services/favorites_service.dart
  4. 10 6
      lib/ui/account/email_entry_page.dart
  5. 2 2
      lib/ui/account/login_page.dart
  6. 5 5
      lib/ui/account/ott_verification_page.dart
  7. 13 11
      lib/ui/account/password_entry_page.dart
  8. 15 11
      lib/ui/account/password_reentry_page.dart
  9. 4 4
      lib/ui/account/recovery_key_page.dart
  10. 8 6
      lib/ui/account/recovery_page.dart
  11. 1 1
      lib/ui/account/sessions_page.dart
  12. 2 2
      lib/ui/collections/button/archived_button.dart
  13. 1 1
      lib/ui/collections/button/hidden_button.dart
  14. 2 2
      lib/ui/collections/button/trash_button.dart
  15. 2 2
      lib/ui/collections/button/uncategorized_button.dart
  16. 0 2
      lib/ui/components/bottom_action_bar/bottom_action_bar_widget.dart
  17. 3 3
      lib/ui/home/grant_permissions_widget.dart
  18. 2 2
      lib/ui/home/landing_page_widget.dart
  19. 2 2
      lib/ui/home/loading_photos_widget.dart
  20. 1 1
      lib/ui/home/memories/full_screen_memory.dart
  21. 1 1
      lib/ui/home/start_backup_hook_widget.dart
  22. 3 3
      lib/ui/payment/child_subscription_widget.dart
  23. 1 1
      lib/ui/payment/skip_subscription_widget.dart
  24. 6 6
      lib/ui/payment/subscription_common_widgets.dart
  25. 2 2
      lib/ui/payment/subscription_plan_widget.dart
  26. 1 1
      lib/ui/settings/app_update_dialog.dart
  27. 1 1
      lib/ui/settings/app_version_widget.dart
  28. 6 4
      lib/ui/settings/backup/backup_folder_selection_page.dart
  29. 2 1
      lib/ui/sharing/share_collection_page.dart
  30. 2 2
      lib/ui/tabs/shared/empty_state.dart
  31. 1 1
      lib/ui/tabs/shared/incoming_album_item.dart
  32. 3 3
      lib/ui/tabs/user_collections_tab.dart
  33. 0 1
      lib/ui/tools/collage/collage_with_five_items.dart
  34. 0 1
      lib/ui/tools/collage/collage_with_six_items.dart
  35. 0 1
      lib/ui/tools/collage/collage_with_two_items.dart
  36. 5 5
      lib/ui/tools/deduplicate_page.dart
  37. 6 6
      lib/ui/tools/editor/image_editor_page.dart
  38. 1 1
      lib/ui/viewer/file/file_icons_widget.dart
  39. 1 1
      lib/ui/viewer/gallery/gallery_app_bar_widget.dart
  40. 2 2
      lib/ui/viewer/gallery/trash_page.dart
  41. 1 1
      lib/ui/viewer/search/search_widget.dart
  42. 1 1
      lib/utils/dialog_util.dart

+ 1 - 1
ios/Podfile.lock

@@ -378,4 +378,4 @@ SPEC CHECKSUMS:
 
 PODFILE CHECKSUM: c1a8f198a245ed1f10e40b617efdb129b021b225
 
-COCOAPODS: 1.11.3
+COCOAPODS: 1.12.1

+ 11 - 11
lib/ente_theme_data.dart

@@ -39,8 +39,8 @@ final lightThemeData = ThemeData(
   //https://api.flutter.dev/flutter/material/TextTheme-class.html
   textTheme: _buildTextTheme(const Color.fromRGBO(0, 0, 0, 1)),
   primaryTextTheme: const TextTheme().copyWith(
-    bodyText2: const TextStyle(color: Colors.yellow),
-    bodyText1: const TextStyle(color: Colors.orange),
+    bodyMedium: const TextStyle(color: Colors.yellow),
+    bodyLarge: const TextStyle(color: Colors.orange),
   ),
   cardColor: const Color.fromRGBO(250, 250, 250, 1.0),
   dialogTheme: const DialogTheme().copyWith(
@@ -161,54 +161,54 @@ final darkThemeData = ThemeData(
 
 TextTheme _buildTextTheme(Color textColor) {
   return const TextTheme().copyWith(
-    headline4: TextStyle(
+    headlineMedium: TextStyle(
       color: textColor,
       fontSize: 32,
       fontWeight: FontWeight.w600,
       fontFamily: 'Inter',
     ),
-    headline5: TextStyle(
+    headlineSmall: TextStyle(
       color: textColor,
       fontSize: 24,
       fontWeight: FontWeight.w600,
       fontFamily: 'Inter',
     ),
-    headline6: TextStyle(
+    titleLarge: TextStyle(
       color: textColor,
       fontSize: 18,
       fontFamily: 'Inter',
       fontWeight: FontWeight.w600,
     ),
-    subtitle1: TextStyle(
+    titleMedium: TextStyle(
       color: textColor,
       fontFamily: 'Inter',
       fontSize: 16,
       fontWeight: FontWeight.w500,
     ),
-    subtitle2: TextStyle(
+    titleSmall: TextStyle(
       color: textColor,
       fontFamily: 'Inter',
       fontSize: 14,
       fontWeight: FontWeight.w500,
     ),
-    bodyText1: TextStyle(
+    bodyLarge: TextStyle(
       fontFamily: 'Inter',
       color: textColor,
       fontSize: 16,
       fontWeight: FontWeight.w500,
     ),
-    bodyText2: TextStyle(
+    bodyMedium: TextStyle(
       fontFamily: 'Inter',
       color: textColor,
       fontSize: 14,
       fontWeight: FontWeight.w500,
     ),
-    caption: TextStyle(
+    bodySmall: TextStyle(
       color: textColor.withOpacity(0.6),
       fontSize: 14,
       fontWeight: FontWeight.w500,
     ),
-    overline: TextStyle(
+    labelSmall: TextStyle(
       fontFamily: 'Inter',
       color: textColor,
       fontSize: 14,

+ 1 - 1
lib/services/favorites_service.dart

@@ -28,7 +28,7 @@ class FavoritesService {
   late StreamSubscription<CollectionUpdatedEvent>
       _collectionUpdatesSubscription;
 
-  FavoritesService._privateConstructor() {}
+  FavoritesService._privateConstructor();
   Future<void> initFav() async {
     _config = Configuration.instance;
     _collectionsService = CollectionsService.instance;

+ 10 - 6
lib/ui/account/email_entry_page.dart

@@ -135,13 +135,13 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
                       const EdgeInsets.symmetric(vertical: 30, horizontal: 20),
                   child: Text(
                     S.of(context).createNewAccount,
-                    style: Theme.of(context).textTheme.headline4,
+                    style: Theme.of(context).textTheme.headlineMedium,
                   ),
                 ),
                 Padding(
                   padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
                   child: TextFormField(
-                    style: Theme.of(context).textTheme.subtitle1,
+                    style: Theme.of(context).textTheme.titleMedium,
                     autofillHints: const [AutofillHints.email],
                     decoration: InputDecoration(
                       fillColor: _emailIsValid ? _validFieldValueColor : null,
@@ -371,8 +371,10 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
           Expanded(
             child: StyledText(
               text: S.of(context).signUpTerms,
-              style:
-                  Theme.of(context).textTheme.subtitle1!.copyWith(fontSize: 12),
+              style: Theme.of(context)
+                  .textTheme
+                  .titleMedium!
+                  .copyWith(fontSize: 12),
               tags: {
                 'u-terms': StyledTextActionTag(
                   (String? text, Map<String?, String?> attrs) => {
@@ -438,8 +440,10 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
           Expanded(
             child: StyledText(
               text: S.of(context).ackPasswordLostWarning,
-              style:
-                  Theme.of(context).textTheme.subtitle1!.copyWith(fontSize: 12),
+              style: Theme.of(context)
+                  .textTheme
+                  .titleMedium!
+                  .copyWith(fontSize: 12),
               tags: {
                 'underline': StyledTextActionTag(
                   (String? text, Map<String?, String?> attrs) => {

+ 2 - 2
lib/ui/account/login_page.dart

@@ -82,7 +82,7 @@ class _LoginPageState extends State<LoginPage> {
                       const EdgeInsets.symmetric(vertical: 30, horizontal: 20),
                   child: Text(
                     l10n.accountWelcomeBack,
-                    style: Theme.of(context).textTheme.headline4,
+                    style: Theme.of(context).textTheme.headlineMedium,
                   ),
                 ),
                 Padding(
@@ -148,7 +148,7 @@ class _LoginPageState extends State<LoginPage> {
                           text: S.of(context).loginTerms,
                           style: Theme.of(context)
                               .textTheme
-                              .subtitle1!
+                              .titleMedium!
                               .copyWith(fontSize: 12),
                           tags: {
                             'u-terms': StyledTextActionTag(

+ 5 - 5
lib/ui/account/ott_verification_page.dart

@@ -97,7 +97,7 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
               padding: const EdgeInsets.fromLTRB(20, 30, 20, 15),
               child: Text(
                 S.of(context).verifyEmail,
-                style: Theme.of(context).textTheme.headline4,
+                style: Theme.of(context).textTheme.headlineMedium,
               ),
             ),
             Padding(
@@ -114,7 +114,7 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
                             text: S.of(context).weHaveSendEmailTo(widget.email),
                             style: Theme.of(context)
                                 .textTheme
-                                .subtitle1!
+                                .titleMedium!
                                 .copyWith(fontSize: 14),
                             tags: {
                               'green': StyledTextTag(
@@ -131,7 +131,7 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
                           S.of(context).checkInboxAndSpamFolder,
                           style: Theme.of(context)
                               .textTheme
-                              .subtitle1!
+                              .titleMedium!
                               .copyWith(fontSize: 14),
                         ),
                       ],
@@ -148,7 +148,7 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
               padding: const EdgeInsets.fromLTRB(20, 16, 20, 16),
               child: TextFormField(
                 key: const ValueKey("ottVerificationInputField"),
-                style: Theme.of(context).textTheme.subtitle1,
+                style: Theme.of(context).textTheme.titleMedium,
                 decoration: InputDecoration(
                   filled: true,
                   hintText: S.of(context).tapToEnterCode,
@@ -185,7 +185,7 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
                     },
                     child: Text(
                       S.of(context).resendEmail,
-                      style: Theme.of(context).textTheme.subtitle1!.copyWith(
+                      style: Theme.of(context).textTheme.titleMedium!.copyWith(
                             fontSize: 14,
                             decoration: TextDecoration.underline,
                           ),

+ 13 - 11
lib/ui/account/password_entry_page.dart

@@ -155,7 +155,7 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
                       const EdgeInsets.symmetric(vertical: 30, horizontal: 20),
                   child: Text(
                     buttonTextAndHeading,
-                    style: Theme.of(context).textTheme.headline4,
+                    style: Theme.of(context).textTheme.headlineMedium,
                   ),
                 ),
                 Padding(
@@ -167,7 +167,7 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
                     textAlign: TextAlign.start,
                     style: Theme.of(context)
                         .textTheme
-                        .subtitle1!
+                        .titleMedium!
                         .copyWith(fontSize: 14),
                   ),
                 ),
@@ -178,14 +178,15 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
                     text: S.of(context).passwordWarning,
                     style: Theme.of(context)
                         .textTheme
-                        .subtitle1!
+                        .titleMedium!
                         .copyWith(fontSize: 14),
                     tags: {
                       'underline': StyledTextTag(
-                        style: Theme.of(context).textTheme.subtitle1!.copyWith(
-                              fontSize: 14,
-                              decoration: TextDecoration.underline,
-                            ),
+                        style:
+                            Theme.of(context).textTheme.titleMedium!.copyWith(
+                                  fontSize: 14,
+                                  decoration: TextDecoration.underline,
+                                ),
                       ),
                     },
                   ),
@@ -357,10 +358,11 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
                     child: RichText(
                       text: TextSpan(
                         text: S.of(context).howItWorks,
-                        style: Theme.of(context).textTheme.subtitle1!.copyWith(
-                              fontSize: 14,
-                              decoration: TextDecoration.underline,
-                            ),
+                        style:
+                            Theme.of(context).textTheme.titleMedium!.copyWith(
+                                  fontSize: 14,
+                                  decoration: TextDecoration.underline,
+                                ),
                       ),
                     ),
                   ),

+ 15 - 11
lib/ui/account/password_reentry_page.dart

@@ -150,7 +150,7 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
                       const EdgeInsets.symmetric(vertical: 30, horizontal: 20),
                   child: Text(
                     S.of(context).welcomeBack,
-                    style: Theme.of(context).textTheme.headline4,
+                    style: Theme.of(context).textTheme.headlineMedium,
                   ),
                 ),
                 Visibility(
@@ -236,11 +236,13 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
                         child: Center(
                           child: Text(
                             S.of(context).forgotPassword,
-                            style:
-                                Theme.of(context).textTheme.subtitle1!.copyWith(
-                                      fontSize: 14,
-                                      decoration: TextDecoration.underline,
-                                    ),
+                            style: Theme.of(context)
+                                .textTheme
+                                .titleMedium!
+                                .copyWith(
+                                  fontSize: 14,
+                                  decoration: TextDecoration.underline,
+                                ),
                           ),
                         ),
                       ),
@@ -260,11 +262,13 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
                         child: Center(
                           child: Text(
                             S.of(context).changeEmail,
-                            style:
-                                Theme.of(context).textTheme.subtitle1!.copyWith(
-                                      fontSize: 14,
-                                      decoration: TextDecoration.underline,
-                                    ),
+                            style: Theme.of(context)
+                                .textTheme
+                                .titleMedium!
+                                .copyWith(
+                                  fontSize: 14,
+                                  decoration: TextDecoration.underline,
+                                ),
                           ),
                         ),
                       ),

+ 4 - 4
lib/ui/account/recovery_key_page.dart

@@ -103,7 +103,7 @@ class _RecoveryKeyPageState extends State<RecoveryKeyPage> {
                           ? const SizedBox.shrink()
                           : Text(
                               widget.title ?? S.of(context).recoveryKey,
-                              style: Theme.of(context).textTheme.headline4,
+                              style: Theme.of(context).textTheme.headlineMedium,
                             ),
                       Padding(
                         padding: EdgeInsets.all(widget.showAppBar! ? 0 : 12),
@@ -111,7 +111,7 @@ class _RecoveryKeyPageState extends State<RecoveryKeyPage> {
                       Text(
                         widget.text ??
                             S.of(context).recoveryKeyOnForgotPassword,
-                        style: Theme.of(context).textTheme.subtitle1,
+                        style: Theme.of(context).textTheme.titleMedium,
                       ),
                       const Padding(padding: EdgeInsets.only(top: 24)),
                       DottedBorder(
@@ -165,7 +165,7 @@ class _RecoveryKeyPageState extends State<RecoveryKeyPage> {
                                   child: Text(
                                     recoveryKey,
                                     style:
-                                        Theme.of(context).textTheme.bodyText1,
+                                        Theme.of(context).textTheme.bodyLarge,
                                   ),
                                 ),
                               ),
@@ -178,7 +178,7 @@ class _RecoveryKeyPageState extends State<RecoveryKeyPage> {
                         child: Text(
                           widget.subText ??
                               S.of(context).recoveryKeySaveDescription,
-                          style: Theme.of(context).textTheme.bodyText1,
+                          style: Theme.of(context).textTheme.bodyLarge,
                         ),
                       ),
                       Expanded(

+ 8 - 6
lib/ui/account/recovery_page.dart

@@ -92,7 +92,7 @@ class _RecoveryPageState extends State<RecoveryPage> {
                       const EdgeInsets.symmetric(vertical: 30, horizontal: 20),
                   child: Text(
                     S.of(context).forgotPassword,
-                    style: Theme.of(context).textTheme.headline4,
+                    style: Theme.of(context).textTheme.headlineMedium,
                   ),
                 ),
                 Padding(
@@ -143,11 +143,13 @@ class _RecoveryPageState extends State<RecoveryPage> {
                         child: Center(
                           child: Text(
                             S.of(context).noRecoveryKey,
-                            style:
-                                Theme.of(context).textTheme.subtitle1!.copyWith(
-                                      fontSize: 14,
-                                      decoration: TextDecoration.underline,
-                                    ),
+                            style: Theme.of(context)
+                                .textTheme
+                                .titleMedium!
+                                .copyWith(
+                                  fontSize: 14,
+                                  decoration: TextDecoration.underline,
+                                ),
                           ),
                         ),
                       ),

+ 1 - 1
lib/ui/account/sessions_page.dart

@@ -162,7 +162,7 @@ class _SessionsPageState extends State<SessionsPage> {
             const Padding(padding: EdgeInsets.all(8)),
             Text(
               session.ua,
-              style: Theme.of(context).textTheme.caption,
+              style: Theme.of(context).textTheme.bodySmall,
             ),
           ],
         ),

+ 2 - 2
lib/ui/collections/button/archived_button.dart

@@ -60,7 +60,7 @@ class ArchivedCollectionsButton extends StatelessWidget {
                             children: [
                               TextSpan(
                                 text: S.of(context).archive,
-                                style: Theme.of(context).textTheme.subtitle1,
+                                style: Theme.of(context).textTheme.titleMedium,
                               ),
                               const TextSpan(text: "  \u2022  "),
                               TextSpan(
@@ -77,7 +77,7 @@ class ArchivedCollectionsButton extends StatelessWidget {
                             children: [
                               TextSpan(
                                 text: S.of(context).archive,
-                                style: Theme.of(context).textTheme.subtitle1,
+                                style: Theme.of(context).textTheme.titleMedium,
                               ),
                               //need to query in db and bring this value
                             ],

+ 1 - 1
lib/ui/collections/button/hidden_button.dart

@@ -47,7 +47,7 @@ class HiddenCollectionsButtonWidget extends StatelessWidget {
                       children: [
                         TextSpan(
                           text: S.of(context).hidden,
-                          style: Theme.of(context).textTheme.subtitle1,
+                          style: Theme.of(context).textTheme.titleMedium,
                         ),
                         const TextSpan(text: "  \u2022  "),
                         WidgetSpan(

+ 2 - 2
lib/ui/collections/button/trash_button.dart

@@ -79,7 +79,7 @@ class _TrashSectionButtonState extends State<TrashSectionButton> {
                             children: [
                               TextSpan(
                                 text: S.of(context).trash,
-                                style: Theme.of(context).textTheme.subtitle1,
+                                style: Theme.of(context).textTheme.titleMedium,
                               ),
                               const TextSpan(text: "  \u2022  "),
                               TextSpan(
@@ -96,7 +96,7 @@ class _TrashSectionButtonState extends State<TrashSectionButton> {
                             children: [
                               TextSpan(
                                 text: S.of(context).trash,
-                                style: Theme.of(context).textTheme.subtitle1,
+                                style: Theme.of(context).textTheme.titleMedium,
                               ),
                               //need to query in db and bring this value
                             ],

+ 2 - 2
lib/ui/collections/button/uncategorized_button.dart

@@ -64,7 +64,7 @@ class UnCategorizedCollections extends StatelessWidget {
                             children: [
                               TextSpan(
                                 text: S.of(context).uncategorized,
-                                style: Theme.of(context).textTheme.subtitle1,
+                                style: Theme.of(context).textTheme.titleMedium,
                               ),
                               const TextSpan(text: "  \u2022  "),
                               TextSpan(
@@ -81,7 +81,7 @@ class UnCategorizedCollections extends StatelessWidget {
                             children: [
                               TextSpan(
                                 text: S.of(context).uncategorized,
-                                style: Theme.of(context).textTheme.subtitle1,
+                                style: Theme.of(context).textTheme.titleMedium,
                               ),
                               //need to query in db and bring this value
                             ],

+ 0 - 2
lib/ui/components/bottom_action_bar/bottom_action_bar_widget.dart

@@ -1,5 +1,3 @@
-import 'dart:ui';
-
 import 'package:expandable/expandable.dart';
 import 'package:flutter/material.dart';
 import 'package:photos/core/constants.dart';

+ 3 - 3
lib/ui/home/grant_permissions_widget.dart

@@ -53,7 +53,7 @@ class GrantPermissionsWidget extends StatelessWidget {
                   text: TextSpan(
                     style: Theme.of(context)
                         .textTheme
-                        .headline5!
+                        .headlineSmall!
                         .copyWith(fontWeight: FontWeight.w700),
                     children: [
                       const TextSpan(text: 'ente '),
@@ -61,7 +61,7 @@ class GrantPermissionsWidget extends StatelessWidget {
                         text: "needs permission to ",
                         style: Theme.of(context)
                             .textTheme
-                            .headline5!
+                            .headlineSmall!
                             .copyWith(fontWeight: FontWeight.w400),
                       ),
                       const TextSpan(text: 'preserve your photos'),
@@ -108,7 +108,7 @@ class GrantPermissionsWidget extends StatelessWidget {
                   TextButton(
                     child: Text(
                       S.of(context).ok,
-                      style: Theme.of(context).textTheme.subtitle1!.copyWith(
+                      style: Theme.of(context).textTheme.titleMedium!.copyWith(
                             fontSize: 14,
                             fontWeight: FontWeight.w700,
                           ),

+ 2 - 2
lib/ui/home/landing_page_widget.dart

@@ -292,12 +292,12 @@ class FeatureItemWidget extends StatelessWidget {
           children: [
             Text(
               featureTitleFirstLine,
-              style: Theme.of(context).textTheme.headline5,
+              style: Theme.of(context).textTheme.headlineSmall,
             ),
             const Padding(padding: EdgeInsets.all(2)),
             Text(
               featureTitleSecondLine,
-              style: Theme.of(context).textTheme.headline5,
+              style: Theme.of(context).textTheme.headlineSmall,
             ),
             const Padding(padding: EdgeInsets.all(12)),
             Text(

+ 2 - 2
lib/ui/home/loading_photos_widget.dart

@@ -136,7 +136,7 @@ class _LoadingPhotosWidgetState extends State<LoadingPhotosWidget> {
                           S.of(context).didYouKnow,
                           style: Theme.of(context)
                               .textTheme
-                              .headline6!
+                              .titleLarge!
                               .copyWith(
                                 color: Theme.of(context).colorScheme.greenText,
                               ),
@@ -196,7 +196,7 @@ class _LoadingPhotosWidgetState extends State<LoadingPhotosWidget> {
       textAlign: TextAlign.start,
       style: Theme.of(context)
           .textTheme
-          .headline5!
+          .headlineSmall!
           .copyWith(color: Theme.of(context).colorScheme.defaultTextColor),
     );
   }

+ 1 - 1
lib/ui/home/memories/full_screen_memory.dart

@@ -102,7 +102,7 @@ class _FullScreenMemoryState extends State<FullScreenMemory> {
                       file.creationTime!,
                     ),
                   ),
-                  style: Theme.of(context).textTheme.subtitle1!.copyWith(
+                  style: Theme.of(context).textTheme.titleMedium!.copyWith(
                         fontSize: 14,
                         color: Colors.white,
                       ), //same for both themes

+ 1 - 1
lib/ui/home/start_backup_hook_widget.dart

@@ -28,7 +28,7 @@ class StartBackupHookWidget extends StatelessWidget {
           S.of(context).noPhotosAreBeingBackedUpRightNow,
           style: Theme.of(context)
               .textTheme
-              .caption!
+              .bodySmall!
               .copyWith(fontFamily: 'Inter-Medium', fontSize: 16),
         ),
         Center(

+ 3 - 3
lib/ui/payment/child_subscription_widget.dart

@@ -29,7 +29,7 @@ class ChildSubscriptionWidget extends StatelessWidget {
           Center(
             child: Text(
               S.of(context).youAreOnAFamilyPlan,
-              style: Theme.of(context).textTheme.bodyText1,
+              style: Theme.of(context).textTheme.bodyLarge,
             ),
           ),
           const Padding(
@@ -39,7 +39,7 @@ class ChildSubscriptionWidget extends StatelessWidget {
             padding: const EdgeInsets.symmetric(horizontal: 16),
             child: StyledText(
               text: S.of(context).contactFamilyAdmin(familyAdmin),
-              style: Theme.of(context).textTheme.bodyText1,
+              style: Theme.of(context).textTheme.bodyLarge,
               tags: {
                 'green': StyledTextTag(
                   style: TextStyle(
@@ -94,7 +94,7 @@ class ChildSubscriptionWidget extends StatelessWidget {
                         text: S
                             .of(context)
                             .pleaseContactSupportAndWeWillBeHappyToHelp,
-                        style: Theme.of(context).textTheme.bodyText2,
+                        style: Theme.of(context).textTheme.bodyMedium,
                       ),
                     ],
                   ),

+ 1 - 1
lib/ui/payment/skip_subscription_widget.dart

@@ -26,7 +26,7 @@ class SkipSubscriptionWidget extends StatelessWidget {
         style: Theme.of(context).outlinedButtonTheme.style?.copyWith(
           textStyle: MaterialStateProperty.resolveWith<TextStyle>(
             (Set<MaterialState> states) {
-              return Theme.of(context).textTheme.subtitle1!;
+              return Theme.of(context).textTheme.titleMedium!;
             },
           ),
         ),

+ 6 - 6
lib/ui/payment/subscription_common_widgets.dart

@@ -38,19 +38,19 @@ class _SubscriptionHeaderWidgetState extends State<SubscriptionHeaderWidget> {
               children: [
                 Text(
                   S.of(context).selectYourPlan,
-                  style: Theme.of(context).textTheme.headline4,
+                  style: Theme.of(context).textTheme.headlineMedium,
                 ),
               ],
             ),
             const SizedBox(height: 10),
             Text(
               S.of(context).enteSubscriptionPitch,
-              style: Theme.of(context).textTheme.caption,
+              style: Theme.of(context).textTheme.bodySmall,
             ),
             const SizedBox(height: 4),
             Text(
               S.of(context).enteSubscriptionShareWithFamily,
-              style: Theme.of(context).textTheme.caption,
+              style: Theme.of(context).textTheme.bodySmall,
             ),
           ],
         ),
@@ -66,13 +66,13 @@ class _SubscriptionHeaderWidgetState extends State<SubscriptionHeaderWidget> {
               children: [
                 TextSpan(
                   text: S.of(context).currentUsageIs,
-                  style: Theme.of(context).textTheme.subtitle1,
+                  style: Theme.of(context).textTheme.titleMedium,
                 ),
                 TextSpan(
                   text: formatBytes(widget.currentUsage!),
                   style: Theme.of(context)
                       .textTheme
-                      .subtitle1!
+                      .titleMedium!
                       .copyWith(fontWeight: FontWeight.bold),
                 )
               ],
@@ -109,7 +109,7 @@ class ValidityWidget extends StatelessWidget {
       padding: const EdgeInsets.only(top: 8),
       child: Text(
         message,
-        style: Theme.of(context).textTheme.caption,
+        style: Theme.of(context).textTheme.bodySmall,
       ),
     );
   }

+ 2 - 2
lib/ui/payment/subscription_plan_widget.dart

@@ -57,12 +57,12 @@ class SubscriptionPlanWidget extends StatelessWidget {
                   convertBytesToReadableFormat(storage),
                   style: Theme.of(context)
                       .textTheme
-                      .headline6!
+                      .titleLarge!
                       .copyWith(color: textColor),
                 ),
                 Text(
                   _displayPrice(context),
-                  style: Theme.of(context).textTheme.headline6!.copyWith(
+                  style: Theme.of(context).textTheme.titleLarge!.copyWith(
                         color: textColor,
                         fontWeight: FontWeight.normal,
                       ),

+ 1 - 1
lib/ui/settings/app_update_dialog.dart

@@ -96,7 +96,7 @@ class _AppUpdateDialogState extends State<AppUpdateDialog> {
               S.of(context).installManually,
               style: Theme.of(context)
                   .textTheme
-                  .caption!
+                  .bodySmall!
                   .copyWith(decoration: TextDecoration.underline),
             ),
             onTap: () => launchUrlString(

+ 1 - 1
lib/ui/settings/app_version_widget.dart

@@ -42,7 +42,7 @@ class _AppVersionWidgetState extends State<AppVersionWidget> {
               padding: const EdgeInsets.all(20),
               child: Text(
                 S.of(context).appVersion(snapshot.data!),
-                style: Theme.of(context).textTheme.caption,
+                style: Theme.of(context).textTheme.bodySmall,
               ),
             );
           }

+ 6 - 4
lib/ui/settings/backup/backup_folder_selection_page.dart

@@ -102,7 +102,8 @@ class _BackupFolderSelectionPageState extends State<BackupFolderSelectionPage> {
             padding: const EdgeInsets.only(left: 24, right: 48),
             child: Text(
               S.of(context).selectedFoldersWillBeEncryptedAndBackedUp,
-              style: Theme.of(context).textTheme.caption!.copyWith(height: 1.3),
+              style:
+                  Theme.of(context).textTheme.bodySmall!.copyWith(height: 1.3),
             ),
           ),
           const Padding(
@@ -192,9 +193,10 @@ class _BackupFolderSelectionPageState extends State<BackupFolderSelectionPage> {
                         },
                         child: Text(
                           S.of(context).skip,
-                          style: Theme.of(context).textTheme.caption!.copyWith(
-                                decoration: TextDecoration.underline,
-                              ),
+                          style:
+                              Theme.of(context).textTheme.bodySmall!.copyWith(
+                                    decoration: TextDecoration.underline,
+                                  ),
                         ),
                       ),
                     )

+ 2 - 1
lib/ui/sharing/share_collection_page.dart

@@ -289,7 +289,8 @@ class _ShareCollectionPageState extends State<ShareCollectionPage> {
       appBar: AppBar(
         title: Text(
           widget.collection.displayName,
-          style: Theme.of(context).textTheme.headline5?.copyWith(fontSize: 16),
+          style:
+              Theme.of(context).textTheme.headlineSmall?.copyWith(fontSize: 16),
         ),
         elevation: 0,
         centerTitle: false,

+ 2 - 2
lib/ui/tabs/shared/empty_state.dart

@@ -120,7 +120,7 @@ class OutgoingAlbumEmptyState extends StatelessWidget {
         children: [
           Text(
             S.of(context).shareYourFirstAlbum,
-            style: Theme.of(context).textTheme.caption,
+            style: Theme.of(context).textTheme.bodySmall,
           ),
           const Padding(padding: EdgeInsets.only(top: 14)),
           SizedBox(
@@ -160,7 +160,7 @@ class IncomingAlbumEmptyState extends StatelessWidget {
         children: [
           Text(
             S.of(context).askYourLovedOnesToShare,
-            style: Theme.of(context).textTheme.caption,
+            style: Theme.of(context).textTheme.bodySmall,
           ),
           const Padding(padding: EdgeInsets.only(top: 14)),
           SizedBox(

+ 1 - 1
lib/ui/tabs/shared/incoming_album_item.dart

@@ -22,7 +22,7 @@ class IncomingAlbumItem extends StatelessWidget {
     const double horizontalPaddingOfGridRow = 16;
     const double crossAxisSpacingOfGrid = 9;
     final TextStyle albumTitleTextStyle =
-        Theme.of(context).textTheme.subtitle1!.copyWith(fontSize: 14);
+        Theme.of(context).textTheme.titleMedium!.copyWith(fontSize: 14);
     final Size size = MediaQuery.of(context).size;
     final int albumsCountInOneRow = max(size.width ~/ 220.0, 2);
     final double totalWhiteSpaceOfRow = (horizontalPaddingOfGridRow * 2) +

+ 3 - 3
lib/ui/tabs/user_collections_tab.dart

@@ -137,9 +137,9 @@ class _UserCollectionsTabState extends State<UserCollectionsTab>
             collections!.where((c) => c.thumbnail == null).length >= 3;
     final TextStyle trashAndHiddenTextStyle = Theme.of(context)
         .textTheme
-        .subtitle1!
+        .titleMedium!
         .copyWith(
-          color: Theme.of(context).textTheme.subtitle1!.color!.withOpacity(0.5),
+          color: Theme.of(context).textTheme.titleMedium!.color!.withOpacity(0.5),
         );
 
     return SingleChildScrollView(
@@ -205,7 +205,7 @@ class _UserCollectionsTabState extends State<UserCollectionsTab>
       }
       return Text(
         text,
-        style: Theme.of(context).textTheme.subtitle1!.copyWith(
+        style: Theme.of(context).textTheme.titleMedium!.copyWith(
               fontSize: 14,
               color: Theme.of(context).iconTheme.color!.withOpacity(0.7),
             ),

+ 0 - 1
lib/ui/tools/collage/collage_with_five_items.dart

@@ -1,5 +1,4 @@
 import "package:flutter/material.dart";
-import "package:flutter/widgets.dart";
 import "package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart";
 import "package:photos/models/file.dart";
 import "package:photos/ui/tools/collage/collage_common_widgets.dart";

+ 0 - 1
lib/ui/tools/collage/collage_with_six_items.dart

@@ -1,5 +1,4 @@
 import "package:flutter/material.dart";
-import "package:flutter/widgets.dart";
 import "package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart";
 import "package:photos/models/file.dart";
 import "package:photos/ui/tools/collage/collage_common_widgets.dart";

+ 0 - 1
lib/ui/tools/collage/collage_with_two_items.dart

@@ -1,5 +1,4 @@
 import "package:flutter/material.dart";
-import "package:flutter/widgets.dart";
 import "package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart";
 import "package:photos/models/file.dart";
 import "package:photos/ui/tools/collage/collage_common_widgets.dart";

+ 5 - 5
lib/ui/tools/deduplicate_page.dart

@@ -124,7 +124,7 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
                         S.of(context).deselectAll,
                         style: Theme.of(context)
                             .textTheme
-                            .subtitle1!
+                            .titleMedium!
                             .copyWith(fontWeight: FontWeight.w600),
                       ),
                     ),
@@ -208,7 +208,7 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
         children: [
           Text(
             S.of(context).reviewDeduplicateItems,
-            style: Theme.of(context).textTheme.subtitle2,
+            style: Theme.of(context).textTheme.titleSmall,
           ),
           const Padding(
             padding: EdgeInsets.all(12),
@@ -297,7 +297,7 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
       }
       return Text(
         text,
-        style: Theme.of(context).textTheme.subtitle1!.copyWith(
+        style: Theme.of(context).textTheme.titleMedium!.copyWith(
               fontSize: 14,
               color: Theme.of(context).iconTheme.color!.withOpacity(0.7),
             ),
@@ -420,7 +420,7 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
                 " files, " +
                 formatBytes(duplicates.size) +
                 " each",
-            style: Theme.of(context).textTheme.subtitle2,
+            style: Theme.of(context).textTheme.titleSmall,
           ),
         ),
         Padding(
@@ -512,7 +512,7 @@ class _DeduplicatePageState extends State<DeduplicatePage> {
                   .getCollectionByID(file.collectionID!)!
                   .displayName,
               style:
-                  Theme.of(context).textTheme.caption!.copyWith(fontSize: 12),
+                  Theme.of(context).textTheme.bodySmall!.copyWith(fontSize: 12),
               overflow: TextOverflow.ellipsis,
             ),
           ),

+ 6 - 6
lib/ui/tools/editor/image_editor_page.dart

@@ -162,7 +162,7 @@ class _ImageEditorPageState extends State<ImageEditorPage> {
   }
 
   Widget _buildFlipButton() {
-    final TextStyle subtitle2 = Theme.of(context).textTheme.subtitle2!;
+    final TextStyle subtitle2 = Theme.of(context).textTheme.titleSmall!;
 
     return GestureDetector(
       behavior: HitTestBehavior.translucent,
@@ -196,7 +196,7 @@ class _ImageEditorPageState extends State<ImageEditorPage> {
   }
 
   Widget _buildRotateLeftButton() {
-    final TextStyle subtitle2 = Theme.of(context).textTheme.subtitle2!;
+    final TextStyle subtitle2 = Theme.of(context).textTheme.titleSmall!;
 
     return GestureDetector(
       behavior: HitTestBehavior.translucent,
@@ -226,7 +226,7 @@ class _ImageEditorPageState extends State<ImageEditorPage> {
   }
 
   Widget _buildRotateRightButton() {
-    final TextStyle subtitle2 = Theme.of(context).textTheme.subtitle2!;
+    final TextStyle subtitle2 = Theme.of(context).textTheme.titleSmall!;
 
     return GestureDetector(
       behavior: HitTestBehavior.translucent,
@@ -256,7 +256,7 @@ class _ImageEditorPageState extends State<ImageEditorPage> {
   }
 
   Widget _buildSaveButton() {
-    final TextStyle subtitle2 = Theme.of(context).textTheme.subtitle2!;
+    final TextStyle subtitle2 = Theme.of(context).textTheme.titleSmall!;
 
     return GestureDetector(
       behavior: HitTestBehavior.translucent,
@@ -416,7 +416,7 @@ class _ImageEditorPageState extends State<ImageEditorPage> {
   }
 
   Widget _buildSat() {
-    final TextStyle subtitle2 = Theme.of(context).textTheme.subtitle2!;
+    final TextStyle subtitle2 = Theme.of(context).textTheme.titleSmall!;
 
     return Container(
       padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
@@ -462,7 +462,7 @@ class _ImageEditorPageState extends State<ImageEditorPage> {
   }
 
   Widget _buildBrightness() {
-    final TextStyle subtitle2 = Theme.of(context).textTheme.subtitle2!;
+    final TextStyle subtitle2 = Theme.of(context).textTheme.titleSmall!;
 
     return Container(
       padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),

+ 1 - 1
lib/ui/viewer/file/file_icons_widget.dart

@@ -150,7 +150,7 @@ class TrashedFileOverlayText extends StatelessWidget {
         S.of(context).trashDaysLeft(daysLeft),
         style: Theme.of(context)
             .textTheme
-            .subtitle2!
+            .titleSmall!
             .copyWith(color: Colors.white), //same for both themes
       ),
     );

+ 1 - 1
lib/ui/viewer/gallery/gallery_app_bar_widget.dart

@@ -98,7 +98,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
                       _appBarTitle!,
                       style: Theme.of(context)
                           .textTheme
-                          .headline5!
+                          .headlineSmall!
                           .copyWith(fontSize: 16),
                     ),
                     onPressed: () => _renameAlbum(context),

+ 2 - 2
lib/ui/viewer/gallery/trash_page.dart

@@ -107,7 +107,7 @@ class TrashPage extends StatelessWidget {
                   .of(context)
                   .itemsShowTheNumberOfDaysRemainingBeforePermanentDeletion,
               style:
-                  Theme.of(context).textTheme.caption!.copyWith(fontSize: 16),
+                  Theme.of(context).textTheme.bodySmall!.copyWith(fontSize: 16),
             ),
           );
         } else {
@@ -145,7 +145,7 @@ class BottomButtonsWidget extends StatelessWidget {
                     ),
                     child: Text(
                       S.of(context).deleteAll,
-                      style: Theme.of(context).textTheme.subtitle2!.copyWith(
+                      style: Theme.of(context).textTheme.titleSmall!.copyWith(
                             color: const Color.fromRGBO(255, 101, 101, 1),
                           ),
                     ),

+ 1 - 1
lib/ui/viewer/search/search_widget.dart

@@ -80,7 +80,7 @@ class _SearchWidgetState extends State<SearchWidget> {
                     height: 44,
                     color: Theme.of(context).colorScheme.defaultBackgroundColor,
                     child: TextFormField(
-                      style: Theme.of(context).textTheme.subtitle1,
+                      style: Theme.of(context).textTheme.titleMedium,
                       // Below parameters are to disable auto-suggestion
                       enableSuggestions: false,
                       autocorrect: false,

+ 1 - 1
lib/utils/dialog_util.dart

@@ -225,7 +225,7 @@ ProgressDialog createProgressDialog(
   );
   dialog.style(
     message: message,
-    messageTextStyle: Theme.of(context).textTheme.caption,
+    messageTextStyle: Theme.of(context).textTheme.bodySmall,
     backgroundColor: Theme.of(context).dialogTheme.backgroundColor,
     progressWidget: const EnteLoadingWidget(),
     borderRadius: 10,