merge method
Implementation
void merge(ResultBuffer? other) {
if (other == null || other == this) {
return;
} else if (other is ConsoleBuffer) {
this._buffer.write(other._buffer);
this._columns.addAll(other._columns);
} else if (other is ColoredFragmentsBuffer) {
for (ColoredBufferFragment fragment in other.fragments) {
write(fragment.contents, color: fragment.color);
}
} else {
throw "Tried to merge different types of buffers! Receiver: ${this.runtimeType.toString()} Other: ${other.runtimeType.toString()}";
}
}