RawWriter.withCapacity constructor

RawWriter.withCapacity(
  1. int capacity, {
  2. bool isExpanding = true,
})

Creates a writer with an allocated buffer of capacity bytes.

Implementation

factory RawWriter.withCapacity(int capacity, {bool isExpanding = true}) {
  return RawWriter.withByteData(ByteData(capacity), isExpanding: isExpanding);
}