updateMany method
Updates Dockers bound to this viewmodel with given ids
Implementation
void updateMany({required List<String> ids}) {
final notFoundIds = <String>[];
assert(
() {
for (final id in ids) {
if (_dockerUpdaters.notContainsKey(id)) {
notFoundIds.add(id);
return false;
}
}
return true;
}(),
"Couldn't find any Docker with ids: $notFoundIds",
);
for (final id in ids) {
final updater = _dockerUpdaters!.entries.where((element) => element.key == id).toList()[0].value;
updater.call();
}
}