BsonBinary.fromBuffer constructor
BsonBinary.fromBuffer(
- BsonBinary buffer
Implementation
factory BsonBinary.fromBuffer(BsonBinary buffer) {
var data = extractData(buffer);
if (data.subType == subtypeUuid) {
return BsonUuid.from(data.byteList);
} else if (data.subType != subtypeBinary) {
throw ArgumentError(
'Binary subtype "${data.subType}" is not yet managed');
}
return BsonBinary.from(data.byteList);
}