add method
Push data
to the stream.
Ignored if skipIfClosed
is true and the stream is closed.
Ignored if skipSame
is true and data
== value
.
Ignored if skipNull
is true and data
is null.
Return true if value
was added.
Implementation
@override
bool add(T data, {bool skipIfClosed = false, bool skipSame = false, bool skipNull = false}) {
if (skipIfClosed && _controller.isClosed) return false;
if (skipSame && data == valueOrNull) return false;
if (skipNull && data == null) return false;
_controller.add(data);
_setValue(data);
return true;
}