toggle method
void
toggle(
- K key,
- V buildValue()
Implementation
void toggle(K key, V Function() buildValue) {
if ($.containsKey(key)) {
$.remove(key);
} else {
$.putIfAbsent(key, buildValue);
}
notifyChange();
}