oID property

ObjectId? get oID

Converts the string to an ObjectId, or returns null if the string is not a valid ObjectId.

This method trims the string and attempts to parse it into an ObjectId. If parsing fails, it returns null.

Returns an ObjectId if the string is a valid ObjectId; otherwise, returns null.

Implementation

ObjectId? get oID => ObjectId.tryParse(trim());