From e40760a07af373d4d39fe36a3ebdc2128e858785 Mon Sep 17 00:00:00 2001
From: Pupsi28 <larslukasneuhaus@gmx.de>
Date: Sun, 17 Mar 2024 17:08:43 +0100
Subject: [PATCH] added fallback option for non existing colors

---
 lib/view/pages/timetable/custonTimetableColors.dart | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/view/pages/timetable/custonTimetableColors.dart b/lib/view/pages/timetable/custonTimetableColors.dart
index 17cc807..bd21695 100644
--- a/lib/view/pages/timetable/custonTimetableColors.dart
+++ b/lib/view/pages/timetable/custonTimetableColors.dart
@@ -27,7 +27,7 @@ class TimetableColors {
   }
 
   static Color getColorFromString(String color){
-    return getDisplayOptions(CustomTimetableColors.values.firstWhere((element) => element.name == color)).color;
+    return getDisplayOptions(CustomTimetableColors.values.firstWhere((element) => element.name == color, orElse: () => CustomTimetableColors.orange)).color;
   }
 }