瀏覽代碼

minor refactoring

Neeraj Gupta 2 年之前
父節點
當前提交
1aeb49d7f7

+ 0 - 8
lib/ente_theme_data.dart

@@ -349,14 +349,6 @@ extension CustomColorScheme on ColorScheme {
       ? const Color.fromRGBO(180, 180, 180, 1)
       : const Color.fromRGBO(100, 100, 100, 1);
 
-  Color get themeSwitchIndicatorColor => brightness == Brightness.light
-      ? const Color.fromRGBO(0, 0, 0, 1).withOpacity(0.75)
-      : const Color.fromRGBO(255, 255, 255, 1);
-
-  Color get themeSwitchActiveIconColor => brightness == Brightness.light
-      ? const Color.fromRGBO(255, 255, 255, 1)
-      : const Color.fromRGBO(0, 0, 0, 1);
-
   Color get themeSwitchInactiveIconColor => brightness == Brightness.light
       ? const Color.fromRGBO(0, 0, 0, 1).withOpacity(0.5)
       : const Color.fromRGBO(255, 255, 255, 1).withOpacity(0.5);

+ 2 - 2
lib/theme/ente_theme.dart

@@ -20,7 +20,7 @@ class EnteTheme {
 }
 
 EnteTheme lightTheme = EnteTheme(
-  lightTextStyle,
+  lightTextTheme,
   lightScheme,
   shadowFloat: shadowFloatLight,
   shadowMenu: shadowMenuLight,
@@ -28,7 +28,7 @@ EnteTheme lightTheme = EnteTheme(
 );
 
 EnteTheme darkTheme = EnteTheme(
-  darkTextStyle,
+  darkTextTheme,
   darkScheme,
   shadowFloat: shadowFloatDark,
   shadowMenu: shadowMenuDark,

+ 2 - 2
lib/theme/text_style.dart

@@ -92,8 +92,8 @@ class EnteTextTheme {
   });
 }
 
-EnteTextTheme lightTextStyle = _buildEnteTextStyle(textBaseLight);
-EnteTextTheme darkTextStyle = _buildEnteTextStyle(textBaseDark);
+EnteTextTheme lightTextTheme = _buildEnteTextStyle(textBaseLight);
+EnteTextTheme darkTextTheme = _buildEnteTextStyle(textBaseDark);
 
 EnteTextTheme _buildEnteTextStyle(Color color) {
   return EnteTextTheme(

+ 1 - 1
lib/ui/components/notification_warning_widget.dart

@@ -45,7 +45,7 @@ class NotificationWarningWidget extends StatelessWidget {
                   Flexible(
                     child: Text(
                       text,
-                      style: darkTextStyle.bodyBold,
+                      style: darkTextTheme.bodyBold,
                       textAlign: TextAlign.left,
                     ),
                   ),