copy method

ByteArray copy([
  1. int? start,
  2. int? end
])

Creates a copy of this byte array.

start the starting index (optional) end the ending index (optional)

Implementation

ByteArray copy([int? start, int? end]) {
  return ByteArray.fromList(_bytes.sublist(start ?? 0, end));
}