IdGenerator class
Constructors
- IdGenerator.raw({SnowflakeConfig config = _kDefaultConfig, required int dataCenterId, required int workerId, int currentTimeSupplier() = _realCurrentTimeSupplier})
Properties
- config → SnowflakeConfig
-
final
- currentTimeSupplier → int Function()
-
final
- dataCenterId → int
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- lastTimestamp ↔ int
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sequence ↔ int
-
getter/setter pair
- workerId → int
-
final
Methods
-
nextId(
) → int -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → IdGenerator
-
final
Static Methods
-
assembleId(
{required SnowflakeConfig config, required int timestamp, required int workerId, required int dataCenterId, required int sequence}) → int