packElement method

void packElement(
  1. String? name,
  2. BsonBinary buffer
)

Implementation

void packElement(String? name, BsonBinary buffer) {
  buffer.writeByte(typeByte);
  if (name != null) {
    BsonCString(name).packValue(buffer);
  }
  packValue(buffer);
}