continue settings
This commit is contained in:
parent
68c82f76a9
commit
b5aa5136e9
@ -48,12 +48,12 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _addListSetting(list, root, key, value, values) {
|
void _addListSetting(list, root, key, value, List<String> valueList, icon) {
|
||||||
list.add(
|
list.add(
|
||||||
SettingsTile(
|
SettingsTile.navigation(
|
||||||
title: Text(key),
|
title: Text(key),
|
||||||
leading: Icon(Icons.palette),
|
leading: Icon(icon),
|
||||||
trailing: DropdownButton<String>(
|
value: DropdownButton<String>(
|
||||||
value: value,
|
value: value,
|
||||||
onChanged: (newValue) {
|
onChanged: (newValue) {
|
||||||
setState(() {
|
setState(() {
|
||||||
@ -61,11 +61,8 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
items:
|
items:
|
||||||
values.map<DropdownMenuItem<String>>((value) {
|
valueList.map<DropdownMenuItem<String>>((item) {
|
||||||
return DropdownMenuItem<String>(
|
return DropdownMenuItem<String>(value: item, child: Text(item));
|
||||||
value: value,
|
|
||||||
child: Text(value),
|
|
||||||
);
|
|
||||||
}).toList(),
|
}).toList(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -125,7 +122,7 @@ class _MountSettingsWidgetState extends State<MountSettingsWidget> {
|
|||||||
"info",
|
"info",
|
||||||
"debug",
|
"debug",
|
||||||
"trace",
|
"trace",
|
||||||
]);
|
], Icons.event);
|
||||||
} 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