merge method Null safety

void merge(
  1. ResultBuffer buffer
)
override

Implementation

void merge(ResultBuffer buffer) {
  if (buffer is ColoredFragmentsBuffer) {
    fragments.addAll(buffer.fragments);
  } else {
    throw UnsupportedError("Can only merge another ColoredBuffer.");
  }
}