added option for timetable naming modes

This commit is contained in:
2025-01-24 11:50:14 +01:00
parent 9f51d68531
commit 65b29ec4b8
8 changed files with 93 additions and 14 deletions

View File

@ -1,26 +1,21 @@
import 'package:flutter/material.dart';
import '../widget/dropdownDisplay.dart';
class AppTheme {
static ThemeModeDisplay getDisplayOptions(ThemeMode theme) {
static DropdownDisplay getDisplayOptions(ThemeMode theme) {
switch(theme) {
case ThemeMode.system:
return ThemeModeDisplay(icon: Icons.auto_fix_high_outlined, displayName: 'Systemvorgabe');
return DropdownDisplay(icon: Icons.auto_fix_high_outlined, displayName: 'Systemvorgabe');
case ThemeMode.light:
return ThemeModeDisplay(icon: Icons.wb_sunny_outlined, displayName: 'Hell');
return DropdownDisplay(icon: Icons.wb_sunny_outlined, displayName: 'Hell');
case ThemeMode.dark:
return ThemeModeDisplay(icon: Icons.dark_mode_outlined, displayName: 'Dunkel');
return DropdownDisplay(icon: Icons.dark_mode_outlined, displayName: 'Dunkel');
}
}
static bool isDarkMode(BuildContext context) => Theme.of(context).brightness == Brightness.dark;
}
class ThemeModeDisplay {
final IconData icon;
final String displayName;
ThemeModeDisplay({required this.icon, required this.displayName});
}