hexString property

String get hexString

Returns hex string for current ObjectId.

Implementation

String get hexString {
  if (_hexString == null) {
    final _buffer = StringBuffer();
    for (var i = 0; i < _bytes.length; i++) {
      _buffer.write(_bytes[i].toRadixString(16).padLeft(2, '0'));
    }
    _hexString = _buffer.toString();
  }

  return _hexString!;
}