toggleSelection method
Toggles the selection state of the item with the given id
.
Implementation
void toggleSelection(String id) {
if (value.contains(id)) {
value.remove(id);
} else {
value.add(id);
}
notifyListeners();
}
Toggles the selection state of the item with the given id
.
void toggleSelection(String id) {
if (value.contains(id)) {
value.remove(id);
} else {
value.add(id);
}
notifyListeners();
}