smartAdd method
Adds the given value to the set and notifies listeners if the value was added.
value: The element to add to the set.- Returns:
trueif the value was added,falseotherwise.
Implementation
bool smartAdd(T value) {
final added = this.value.add(value);
if (added) {
notify();
}
return added;
}