FrameBorrowedView.borrowedSegments constructor

FrameBorrowedView.borrowedSegments(
  1. Uint8List buf1,
  2. int off1,
  3. int len1, [
  4. Uint8List? buf2,
  5. int off2 = 0,
  6. int len2 = 0,
])

Constructs a borrowed view with one or two segments.

Implementation

factory FrameBorrowedView.borrowedSegments(
  Uint8List buf1,
  int off1,
  int len1, [
  Uint8List? buf2,
  int off2 = 0,
  int len2 = 0,
]) {
  return FrameBorrowedView._(
    buf1,
    off1,
    len1,
    buf2 ?? _empty,
    off2,
    len2,
    isBorrowed: true,
  );
}