cleanup
This commit is contained in:
parent
d08fd52e51
commit
343ac025d5
@ -53,9 +53,11 @@ class MountList with ChangeNotifier {
|
||||
}
|
||||
List<Mount> nextList = [];
|
||||
|
||||
jsonDecode(response.body).forEach((key, value) {
|
||||
jsonDecode(response.body).forEach((type, value) {
|
||||
nextList.addAll(
|
||||
value.map((name) => Mount(MountConfig.fromJson(key, name))).toList(),
|
||||
value
|
||||
.map((name) => Mount(MountConfig(type: type, name: name)))
|
||||
.toList(),
|
||||
);
|
||||
});
|
||||
_sort(nextList);
|
||||
|
@ -25,10 +25,6 @@ class MountConfig {
|
||||
IconData? get state => _state;
|
||||
String get type => _type;
|
||||
|
||||
factory MountConfig.fromJson(String type, String name) {
|
||||
return MountConfig(name: name, type: type);
|
||||
}
|
||||
|
||||
void updateSettings(Map<String, dynamic> settings) {
|
||||
_settings = settings;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user