32 lines
819 B
Dart
32 lines
819 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;
|
|
}
|
|
|
|
class AppTheme {
|
|
static DropdownDisplay getDisplayOptions(ThemeMode theme) => switch (theme) {
|
|
ThemeMode.system => DropdownDisplay(
|
|
icon: Icons.auto_fix_high_outlined,
|
|
displayName: 'Systemvorgabe',
|
|
),
|
|
ThemeMode.light => DropdownDisplay(
|
|
icon: Icons.wb_sunny_outlined,
|
|
displayName: 'Hell',
|
|
),
|
|
ThemeMode.dark => DropdownDisplay(
|
|
icon: Icons.dark_mode_outlined,
|
|
displayName: 'Dunkel',
|
|
),
|
|
};
|
|
|
|
static bool isDarkMode(BuildContext context) =>
|
|
Theme.of(context).brightness == Brightness.dark;
|
|
}
|