observe method
Attaches a listener to changes happening in the ObservableSet. You have
the option to be notified immediately (fireImmediately
) or wait for until the first change.
Implementation
@override
Dispose observe(SetChangeListener<T> listener,
{bool fireImmediately = false}) {
if (fireImmediately == true) {
for (final value in _set) {
listener(SetChange(
object: this,
type: OperationType.add,
value: value,
));
}
}
return _listeners.add(listener);
}