From 5e96f7bb55ca8ad55e519b14d33579a8d7dd0867 Mon Sep 17 00:00:00 2001
From: Theo Wiese <theo.wiese@student.reutlingen-university.de>
Date: Thu, 8 May 2025 14:24:26 +0200
Subject: [PATCH] Use correct colors from scheme to work with dark mode

---
 lib/timetable/lesson.dart       | 2 +-
 lib/timetable/lesson_chip.dart  | 2 +-
 lib/timetable/lesson_label.dart | 5 ++++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/lib/timetable/lesson.dart b/lib/timetable/lesson.dart
index 64c1278..9b31155 100644
--- a/lib/timetable/lesson.dart
+++ b/lib/timetable/lesson.dart
@@ -49,7 +49,7 @@ class LessonWidget extends StatelessWidget {
             padding: const EdgeInsets.symmetric(horizontal: 1),
             child: Material(
               elevation: 2,
-              color: Theme.of(context).primaryColor,
+              color: Theme.of(context).colorScheme.primary,
               borderRadius: BorderRadius.circular(6),
               clipBehavior: Clip.antiAlias,
               child: InkWell(
diff --git a/lib/timetable/lesson_chip.dart b/lib/timetable/lesson_chip.dart
index 2847db3..a5c9a83 100644
--- a/lib/timetable/lesson_chip.dart
+++ b/lib/timetable/lesson_chip.dart
@@ -13,7 +13,7 @@ class LessonChip extends StatelessWidget {
     required bool pressable,
   }) {
     final theme = Theme.of(context);
-    return pressable ? theme.primaryColor : theme.iconTheme.color!;
+    return pressable ? theme.colorScheme.primary : theme.iconTheme.color!;
   }
 
   static WidgetStateColor getTextColor(BuildContext context) =>
diff --git a/lib/timetable/lesson_label.dart b/lib/timetable/lesson_label.dart
index 1cd8179..b0461a0 100644
--- a/lib/timetable/lesson_label.dart
+++ b/lib/timetable/lesson_label.dart
@@ -22,7 +22,10 @@ class LessonLabel extends StatelessWidget {
           const TextSpan(text: '\n'),
           TextSpan(text: lecture),
         ],
-        style: Theme.of(context).primaryTextTheme.bodySmall!,
+        style: Theme.of(context)
+            .primaryTextTheme
+            .bodySmall!
+            .copyWith(color: Theme.of(context).colorScheme.onPrimary),
       ),
       textAlign: TextAlign.center,
     );
-- 
GitLab