| 1234567891011121314151617 |
- /// The three theme choices exposed in Settings.
- enum ThemePreference {
- light('light'),
- dark('dark'),
- automatic('automatic');
- const ThemePreference(this.storageValue);
- final String storageValue;
- static ThemePreference fromStorage(String? value) {
- return ThemePreference.values.firstWhere(
- (preference) => preference.storageValue == value,
- orElse: () => ThemePreference.automatic,
- );
- }
- }
|