Jelajahi Sumber

Specify color for dividers to keep it same after flutter upgrade

New material theme has a different default colour for dividers
ashilkn 1 tahun lalu
induk
melakukan
4c73fb7374

+ 4 - 1
mobile/lib/ui/account/email_entry_page.dart

@@ -375,7 +375,10 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
                     textInputAction: TextInputAction.next,
                   ),
                 ),
-                const Divider(thickness: 1),
+                Divider(
+                  thickness: 1,
+                  color: getEnteColorScheme(context).strokeFaint,
+                ),
                 const SizedBox(height: 12),
                 _getAgreement(),
                 const SizedBox(height: 40),

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

@@ -8,6 +8,7 @@ import "package:photos/generated/l10n.dart";
 import "package:photos/l10n/l10n.dart";
 import "package:photos/models/api/user/srp.dart";
 import 'package:photos/services/user_service.dart';
+import "package:photos/theme/ente_theme.dart";
 import "package:photos/ui/account/login_pwd_verification_page.dart";
 import 'package:photos/ui/common/dynamic_fab.dart';
 import 'package:photos/ui/common/web_page.dart';
@@ -159,10 +160,11 @@ class _LoginPageState extends State<LoginPage> {
                     autofocus: true,
                   ),
                 ),
-                const Padding(
-                  padding: EdgeInsets.symmetric(vertical: 18),
+                Padding(
+                  padding: const EdgeInsets.symmetric(vertical: 18),
                   child: Divider(
                     thickness: 1,
+                    color: getEnteColorScheme(context).strokeFaint,
                   ),
                 ),
                 Padding(

+ 3 - 2
mobile/lib/ui/account/login_pwd_verification_page.dart

@@ -282,10 +282,11 @@ class _LoginPasswordVerificationPageState
                     },
                   ),
                 ),
-                const Padding(
-                  padding: EdgeInsets.symmetric(vertical: 18),
+                Padding(
+                  padding: const EdgeInsets.symmetric(vertical: 18),
                   child: Divider(
                     thickness: 1,
+                    color: getEnteColorScheme(context).strokeFaint,
                   ),
                 ),
                 Padding(

+ 24 - 20
mobile/lib/ui/account/ott_verification_page.dart

@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
 import 'package:photos/ente_theme_data.dart';
 import "package:photos/generated/l10n.dart";
 import 'package:photos/services/user_service.dart';
+import "package:photos/theme/ente_theme.dart";
 import 'package:photos/ui/common/dynamic_fab.dart';
 import 'package:step_progress_indicator/step_progress_indicator.dart';
 import "package:styled_text/styled_text.dart";
@@ -16,7 +17,7 @@ class OTTVerificationPage extends StatefulWidget {
     this.email, {
     this.isChangeEmail = false,
     this.isCreateAccountScreen = false,
-        this.isResetPasswordScreen = false,
+    this.isResetPasswordScreen = false,
     Key? key,
   }) : super(key: key);
 
@@ -78,9 +79,11 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
               _verificationCodeController.text,
             );
           } else {
-            UserService.instance
-                .verifyEmail(context, _verificationCodeController.text,
-              isResettingPasswordScreen: widget.isResetPasswordScreen,);
+            UserService.instance.verifyEmail(
+              context,
+              _verificationCodeController.text,
+              isResettingPasswordScreen: widget.isResetPasswordScreen,
+            );
           }
           FocusScope.of(context).unfocus();
         },
@@ -130,21 +133,21 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
                             },
                           ),
                         ),
-                        widget.isResetPasswordScreen ?
-                          Text(
-                            S.of(context).toResetVerifyEmail,
-                            style: Theme.of(context)
-                                .textTheme
-                                .titleMedium!
-                                .copyWith(fontSize: 14),
-                          ):
-                        Text(
-                          S.of(context).checkInboxAndSpamFolder,
-                          style: Theme.of(context)
-                              .textTheme
-                              .titleMedium!
-                              .copyWith(fontSize: 14),
-                        ),
+                        widget.isResetPasswordScreen
+                            ? Text(
+                                S.of(context).toResetVerifyEmail,
+                                style: Theme.of(context)
+                                    .textTheme
+                                    .titleMedium!
+                                    .copyWith(fontSize: 14),
+                              )
+                            : Text(
+                                S.of(context).checkInboxAndSpamFolder,
+                                style: Theme.of(context)
+                                    .textTheme
+                                    .titleMedium!
+                                    .copyWith(fontSize: 14),
+                              ),
                       ],
                     ),
                   ),
@@ -178,8 +181,9 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
                 },
               ),
             ),
-            const Divider(
+            Divider(
               thickness: 1,
+              color: getEnteColorScheme(context).strokeFaint,
             ),
             Padding(
               padding: const EdgeInsets.all(20),

+ 4 - 2
mobile/lib/ui/account/password_reentry_page.dart

@@ -9,6 +9,7 @@ import 'package:photos/core/event_bus.dart';
 import 'package:photos/events/subscription_purchased_event.dart';
 import "package:photos/generated/l10n.dart";
 import "package:photos/services/user_service.dart";
+import "package:photos/theme/ente_theme.dart";
 import 'package:photos/ui/account/recovery_page.dart';
 import 'package:photos/ui/common/dynamic_fab.dart';
 import 'package:photos/ui/components/buttons/button_widget.dart';
@@ -257,10 +258,11 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
                     },
                   ),
                 ),
-                const Padding(
-                  padding: EdgeInsets.symmetric(vertical: 18),
+                Padding(
+                  padding: const EdgeInsets.symmetric(vertical: 18),
                   child: Divider(
                     thickness: 1,
+                    color: getEnteColorScheme(context).strokeFaint,
                   ),
                 ),
                 Padding(

+ 4 - 2
mobile/lib/ui/account/recovery_page.dart

@@ -3,6 +3,7 @@ import 'dart:ui';
 import 'package:flutter/material.dart';
 import 'package:photos/core/configuration.dart';
 import "package:photos/generated/l10n.dart";
+import "package:photos/theme/ente_theme.dart";
 import 'package:photos/ui/account/password_entry_page.dart';
 import 'package:photos/ui/common/dynamic_fab.dart';
 import 'package:photos/utils/dialog_util.dart';
@@ -123,10 +124,11 @@ class _RecoveryPageState extends State<RecoveryPage> {
                     },
                   ),
                 ),
-                const Padding(
-                  padding: EdgeInsets.symmetric(vertical: 18),
+                Padding(
+                  padding: const EdgeInsets.symmetric(vertical: 18),
                   child: Divider(
                     thickness: 1,
+                    color: getEnteColorScheme(context).strokeFaint,
                   ),
                 ),
                 Row(

+ 3 - 2
mobile/lib/ui/account/request_pwd_verification_page.dart

@@ -210,10 +210,11 @@ class _RequestPasswordVerificationPageState
                     },
                   ),
                 ),
-                const Padding(
-                  padding: EdgeInsets.symmetric(vertical: 18),
+                Padding(
+                  padding: const EdgeInsets.symmetric(vertical: 18),
                   child: Divider(
                     thickness: 1,
+                    color: getEnteColorScheme(context).strokeFaint,
                   ),
                 ),
               ],

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

@@ -5,6 +5,7 @@ import 'package:photos/ente_theme_data.dart';
 import "package:photos/generated/l10n.dart";
 import 'package:photos/models/sessions.dart';
 import 'package:photos/services/user_service.dart';
+import "package:photos/theme/ente_theme.dart";
 import 'package:photos/ui/common/loading_widget.dart';
 import "package:photos/utils/date_time_util.dart";
 import 'package:photos/utils/dialog_util.dart';
@@ -106,7 +107,9 @@ class _SessionsPageState extends State<SessionsPage> {
             ),
           ),
         ),
-        const Divider(),
+        Divider(
+          color: getEnteColorScheme(context).strokeFaint,
+        ),
       ],
     );
   }

+ 3 - 1
mobile/lib/ui/home/status_bar_widget.dart

@@ -10,6 +10,7 @@ import 'package:photos/events/sync_status_update_event.dart';
 import "package:photos/generated/l10n.dart";
 import 'package:photos/services/sync_service.dart';
 import 'package:photos/services/user_remote_flag_service.dart';
+import "package:photos/theme/ente_theme.dart";
 import 'package:photos/theme/text_style.dart';
 import 'package:photos/ui/account/verify_recovery_page.dart';
 import 'package:photos/ui/components/home_header_widget.dart';
@@ -93,8 +94,9 @@ class _StatusBarWidgetState extends State<StatusBarWidget> {
               : const Text("ente", style: brandStyleMedium),
         ),
         _showErrorBanner
-            ? const Divider(
+            ? Divider(
                 height: 8,
+                color: getEnteColorScheme(context).strokeFaint,
               )
             : const SizedBox.shrink(),
         _showErrorBanner

+ 6 - 1
mobile/lib/ui/tabs/user_collections_tab.dart

@@ -10,6 +10,7 @@ import 'package:photos/events/user_logged_out_event.dart';
 import "package:photos/generated/l10n.dart";
 import 'package:photos/models/collection/collection.dart';
 import 'package:photos/services/collections_service.dart';
+import "package:photos/theme/ente_theme.dart";
 import "package:photos/ui/collections/button/archived_button.dart";
 import "package:photos/ui/collections/button/hidden_button.dart";
 import "package:photos/ui/collections/button/trash_button.dart";
@@ -184,7 +185,11 @@ class _UserCollectionsTabState extends State<UserCollectionsTab>
                 ),
               )
             : const SliverToBoxAdapter(child: SizedBox.shrink()),
-        const SliverToBoxAdapter(child: Divider()),
+        SliverToBoxAdapter(
+          child: Divider(
+            color: getEnteColorScheme(context).strokeFaint,
+          ),
+        ),
         const SliverToBoxAdapter(child: SizedBox(height: 12)),
         SliverToBoxAdapter(
           child: Padding(