ObjectId.fromHexString constructor

ObjectId.fromHexString(
  1. String? hexString
)

Creates a new instance from a 24-byte hexadecimal string representation.

Throws an ArgumentError if the given hex string is not valid.

Implementation

factory ObjectId.fromHexString(String? hexString) {
  List<int?> b = _parseHexString(hexString);
  return ObjectId.fromBytes(b);
}