createId static method

BsonBinary createId(
  1. int seconds
)

creates a BsonBinary representation of this ObjectId with the given number of seconds sinceEpoch

Implementation

static BsonBinary createId(int seconds) => BsonBinary(12)
  ..writeInt(seconds, endianness: Endian.big)
  ..setIntExtended(_randomValue, 5)
  ..setIntExtended(_nextIncrement, 3, endianness: Endian.big);