BytesBuilder constructor

BytesBuilder(
  1. {bool copy: true}
)

Construct a new empty BytesBuilder.

If copy is true, the data is always copied when added to the list. If it copy is false, the data is only copied if needed. That means that if the lists are changed after added to the BytesBuilder, it may effect the output. Default is true.

Implementation

factory BytesBuilder({bool copy: true}) {
  if (copy) {
    return new _CopyingBytesBuilder();
  } else {
    return new _BytesBuilder();
  }
}