asByteData method

ByteData asByteData([
  1. int offset = 0,
  2. int? length
])

Creates a ByteData view over a region of the buffer.

The view starts at the zero indexed offset and contains length items. If length is omitted, the range extends to the end of the buffer.

Changes made to the returned view will reflect in the buffer.

The range must satisy the relations 0offsetoffset+lengththis.length.

Implementation

ByteData asByteData([final int offset = 0, final int? length]) {
  return _data.buffer.asByteData(offset, length);
}