continue settings
This commit is contained in:
parent
b4025cf084
commit
68c82f76a9
@ -48,6 +48,30 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _addListSetting(list, root, key, value, values) {
|
||||||
|
list.add(
|
||||||
|
SettingsTile(
|
||||||
|
title: Text(key),
|
||||||
|
leading: Icon(Icons.palette),
|
||||||
|
trailing: DropdownButton<String>(
|
||||||
|
value: value,
|
||||||
|
onChanged: (newValue) {
|
||||||
|
setState(() {
|
||||||
|
root?[key] = newValue;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
items:
|
||||||
|
values.map<DropdownMenuItem<String>>((value) {
|
||||||
|
return DropdownMenuItem<String>(
|
||||||
|
value: value,
|
||||||
|
child: Text(value),
|
||||||
|
);
|
||||||
|
}).toList(),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
void _addPasswordSetting(list, root, key, value) {
|
void _addPasswordSetting(list, root, key, value) {
|
||||||
list.add(
|
list.add(
|
||||||
SettingsTile.navigation(
|
SettingsTile.navigation(
|
||||||
@ -94,7 +118,14 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
|||||||
} else if (key == "EnableDriveEvents") {
|
} else if (key == "EnableDriveEvents") {
|
||||||
_addBooleanSetting(commonSettings, _settings, key, value);
|
_addBooleanSetting(commonSettings, _settings, key, value);
|
||||||
} else if (key == "EventLevel") {
|
} else if (key == "EventLevel") {
|
||||||
_addStringSetting(commonSettings, _settings, key, value, Icons.event);
|
_addListSetting(commonSettings, _settings, key, value, <String>[
|
||||||
|
"critical",
|
||||||
|
"error",
|
||||||
|
"warn",
|
||||||
|
"info",
|
||||||
|
"debug",
|
||||||
|
"trace",
|
||||||
|
]);
|
||||||
} else if (key == "EvictionDelayMinutes") {
|
} else if (key == "EvictionDelayMinutes") {
|
||||||
_addIntSetting(commonSettings, _settings, key, value);
|
_addIntSetting(commonSettings, _settings, key, value);
|
||||||
} else if (key == "EvictionUseAccessedTime") {
|
} else if (key == "EvictionUseAccessedTime") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user