Add installMethod in settings

This commit is contained in:
Gregory
2023-12-20 11:57:56 +03:00
parent f64f561d6f
commit de67e40c00
4 changed files with 45 additions and 0 deletions

View File

@@ -30,6 +30,29 @@ class _SettingsPageState extends State<SettingsPage> {
settingsProvider.initializeSettings();
}
var installMethodDropdown = DropdownButtonFormField(
decoration: InputDecoration(labelText: tr('installMethod')),
value: settingsProvider.installMethod,
items: [
DropdownMenuItem(
value: InstallMethodSettings.normal,
child: Text(tr('normal')),
),
DropdownMenuItem(
value: InstallMethodSettings.shizuku,
child: Text(tr('shizuku')),
),
DropdownMenuItem(
value: InstallMethodSettings.root,
child: Text(tr('root')),
)
],
onChanged: (value) {
if (value != null) {
settingsProvider.installMethod = value;
}
});
var themeDropdown = DropdownButtonFormField(
decoration: InputDecoration(labelText: tr('theme')),
value: settingsProvider.theme,
@@ -327,6 +350,8 @@ class _SettingsPageState extends State<SettingsPage> {
})
],
),
height16,
installMethodDropdown,
height32,
Text(
tr('sourceSpecific'),