Commit ad17983

derdilla <82763757+NobodyForNothing@users.noreply.github.com>
2024-01-12 15:09:17
fix switch colors on dark mode
Signed-off-by: derdilla <82763757+NobodyForNothing@users.noreply.github.com>
1 parent aeb58e6
Changed files (1)
lib/main.dart
@@ -111,9 +111,6 @@ class AppRoot extends StatelessWidget {
           seedColor: settings.accentColor,
           brightness: Brightness.dark,
           background: Colors.black,
-          // 3:1 ratio changed because of background and outlineVariant looks
-          // better.
-          outline: const Color(0xff3f4947)
         )),
         themeMode: settings.themeMode,
         localizationsDelegates: const [
@@ -133,7 +130,10 @@ class AppRoot extends StatelessWidget {
     final inputBorder = OutlineInputBorder(
         borderSide: BorderSide(
           width: 3,
-          color: colorScheme.outline,
+          // Through black background outlineVariant has enough contrast.
+          color: (colorScheme.background == Colors.black)
+              ? colorScheme.outlineVariant
+              : colorScheme.outline,
         ),
         borderRadius: BorderRadius.circular(20)
     );