mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-31 13:33:28 +01:00 
			
		
		
		
	Add installMethod in settings
This commit is contained in:
		| @@ -17,6 +17,8 @@ import 'package:shared_storage/shared_storage.dart' as saf; | ||||
| String obtainiumTempId = 'imranr98_obtainium_${GitHub().host}'; | ||||
| String obtainiumId = 'dev.imranr.obtainium'; | ||||
|  | ||||
| enum InstallMethodSettings { normal, shizuku, root } | ||||
|  | ||||
| enum ThemeSettings { system, light, dark } | ||||
|  | ||||
| enum ColourSettings { basic, materialYou } | ||||
| @@ -49,6 +51,16 @@ class SettingsProvider with ChangeNotifier { | ||||
|     notifyListeners(); | ||||
|   } | ||||
|  | ||||
|   InstallMethodSettings get installMethod { | ||||
|     return InstallMethodSettings | ||||
|         .values[prefs?.getInt('installMethod') ?? InstallMethodSettings.normal.index]; | ||||
|   } | ||||
|  | ||||
|   set installMethod(InstallMethodSettings t) { | ||||
|     prefs?.setInt('installMethod', t.index); | ||||
|     notifyListeners(); | ||||
|   } | ||||
|  | ||||
|   ThemeSettings get theme { | ||||
|     return ThemeSettings | ||||
|         .values[prefs?.getInt('theme') ?? ThemeSettings.system.index]; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user