add method

  1. @override
bool add(
  1. E element
)
override

Adds the given element to this set.

Returns true if the element was added, false if it was already present. Only notifies subscribers if the element was actually added.

Implementation

@override
bool add(E element) {
  final result = peek.add(element);
  if (result) {
    notify();
  }
  return result;
}