ObjectId.fromHexString constructor
ObjectId.fromHexString(
- String hexString
Implementation
factory ObjectId.fromHexString(String hexString) {
if (!isValidHexId(hexString)) {
throw ArgumentError(
'Expected hexadecimal string with length of 24, got $hexString');
}
return ObjectId._(BsonBinary.fromHexString(hexString));
}