toBuffer method

Buffer toBuffer({
  1. required bool slice,
})

If slice == true the returned buffer is resized to include only the remaining items.

Implementation

Buffer toBuffer({ required final bool slice })
  => buffer.slice(slice ? offset : 0);