mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-31 05:23:28 +01:00 
			
		
		
		
	Look at all these colors!🌈
This commit is contained in:
		| @@ -17,11 +17,10 @@ import 'package:shared_storage/shared_storage.dart' as saf; | ||||
| String obtainiumTempId = 'imranr98_obtainium_${GitHub().hosts[0]}'; | ||||
| String obtainiumId = 'dev.imranr.obtainium'; | ||||
| String obtainiumUrl = 'https://github.com/ImranR98/Obtainium'; | ||||
| Color obtainiumThemeColor = const Color(0xFF6438B5); | ||||
|  | ||||
| enum ThemeSettings { light, dark, system } | ||||
|  | ||||
| enum ColourSettings { basic, materialYou } | ||||
|  | ||||
| enum SortColumnSettings { added, nameAuthor, authorName, releaseDate } | ||||
|  | ||||
| enum SortOrderSettings { ascending, descending } | ||||
| @@ -68,13 +67,23 @@ class SettingsProvider with ChangeNotifier { | ||||
|     notifyListeners(); | ||||
|   } | ||||
|  | ||||
|   ColourSettings get colour { | ||||
|     return ColourSettings | ||||
|         .values[prefs?.getInt('colour') ?? ColourSettings.basic.index]; | ||||
|   Color get themeColor { | ||||
|     int? colorCode = prefs?.getInt('themeColor'); | ||||
|     return (colorCode != null) ? | ||||
|         Color(colorCode) : obtainiumThemeColor; | ||||
|   } | ||||
|  | ||||
|   set colour(ColourSettings t) { | ||||
|     prefs?.setInt('colour', t.index); | ||||
|   set themeColor(Color themeColor) { | ||||
|     prefs?.setInt('themeColor', themeColor.value); | ||||
|     notifyListeners(); | ||||
|   } | ||||
|  | ||||
|   bool get useMaterialYou { | ||||
|     return prefs?.getBool('useMaterialYou') ?? false; | ||||
|   } | ||||
|  | ||||
|   set useMaterialYou(bool useMaterialYou) { | ||||
|     prefs?.setBool('useMaterialYou', useMaterialYou); | ||||
|     notifyListeners(); | ||||
|   } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user