NotifiableSet<E>.from constructor Null safety

NotifiableSet<E>.from(
  1. Iterable elements,
  2. {dynamic propagateNotification = true}
)

Create a NotifiableSet by adding all elements from elements, regardless of their type.

If propagateNotification is true (default value), this NotifiableList will notify all its listeners when a child notify its listeners as well.

Implementation

NotifiableSet.from(Iterable<dynamic> elements, {propagateNotification = true})
    : super() {
  _values = Set<E>.from(elements);
  this.propagateNotification = propagateNotification;
  if (_propagateNotification) _startPropagateNotification();
}