ObjectId class

Constructors

ObjectId({bool clientMode = false})
ObjectId.fromBsonBinary(BsonBinary _id)
ObjectId.fromBuffer(BsonBinary buffer)
ObjectId.fromHexString(String hexString)
factory
ObjectId.fromSeconds(int seconds, [bool clientMode = false])

Properties

$oid String
Returns the hexadecimall string representation of this ObjectId
no setter
dateTime DateTime
no setter
hashCode int
The hash code for this object.
no setteroverride
id BsonBinary
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toHexString() String
Same as $oid. It will be deprecated in a future release.
toJson() String
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

createId(int seconds, bool clientMode) BsonBinary
extractData(BsonBinary buffer) BsonBinary
isValidHexId(String hexString) bool
parse(String hexString) ObjectId
tryParse(String hexString) ObjectId?