22 lines
650 B
Dart
22 lines
650 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../widget/dropdownDisplay.dart';
|
|
|
|
class AppTheme {
|
|
static DropdownDisplay getDisplayOptions(ThemeMode theme) {
|
|
switch(theme) {
|
|
case ThemeMode.system:
|
|
return DropdownDisplay(icon: Icons.auto_fix_high_outlined, displayName: 'Systemvorgabe');
|
|
|
|
case ThemeMode.light:
|
|
return DropdownDisplay(icon: Icons.wb_sunny_outlined, displayName: 'Hell');
|
|
|
|
case ThemeMode.dark:
|
|
return DropdownDisplay(icon: Icons.dark_mode_outlined, displayName: 'Dunkel');
|
|
|
|
}
|
|
}
|
|
|
|
static bool isDarkMode(BuildContext context) => Theme.of(context).brightness == Brightness.dark;
|
|
}
|