setEmpty method
Equivalent to setting an empty stream using setSourceStream.
Any one of setSourceStream, setEmpty, and setError may be called at most once. Trying to call any of them again will fail.
Implementation
void setEmpty() {
if (_stream._isSourceStreamSet) {
throw new StateError("Source stream already set");
}
_stream._setEmpty();
}