33 lines
937 B
Dart
33 lines
937 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../widget/dropdown_display.dart';
|
|
|
|
class AppSpacing {
|
|
static const double xs = 4;
|
|
static const double sm = 8;
|
|
static const double md = 16;
|
|
static const double lg = 24;
|
|
static const double xl = 40;
|
|
}
|
|
|
|
TextStyle inputErrorStyle(BuildContext context) =>
|
|
TextStyle(color: Theme.of(context).colorScheme.error);
|
|
|
|
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;
|
|
}
|