mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-09 15:38:13 -07:00
Init repo
This commit is contained in:
commit
764b6034e3
566 changed files with 212335 additions and 0 deletions
12
lib/util/theme_mode_extension.dart
Normal file
12
lib/util/theme_mode_extension.dart
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import 'package:fladder/util/localization_helper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
extension ThemeModeExtension on ThemeMode {
|
||||
String label(BuildContext context) {
|
||||
return switch (this) {
|
||||
ThemeMode.light => context.localized.themeModeLight,
|
||||
ThemeMode.dark => context.localized.themeModeDark,
|
||||
ThemeMode.system => context.localized.themeModeSystem,
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue