);
    }
    bytes.add(chunk);
  }

  _JsonUtf8Stringifier.stringify(
      object, _indent, _toEncodable, _bufferSize, addChunk);
  if (bytes.length == 1) return bytes[0];
  var length = 0;
  for (var i = 0; i &lt; bytes.length; i++) {
    length += bytes[i].length;
  }
  var result = Uint8List(length);
  for (var i = 0, offset = 0; i &lt; bytes.length; i++) {
    var byteList = bytes[i];
    int end = offset + byteList.length;
    result.setRange(offset, end, byteList);
    offset = end;
  }
  return resu