Snowflake class

Implemented types

Constructors

Snowflake.new({required DateTime epoch, required int value})
Snowflake.fromDateTime(DateTime dt, DateTime epoch)
factory
Snowflake.now(DateTime epoch)
factory
Snowflake.parse(dynamic value, DateTime epoch)
factory

Properties

epoch DateTime
final
hashCode int
The hash code for this object.
no setteroverride
increment int
no setter
isZero bool
no setter
millisecondsSinceEpoch int
no setter
processId int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp DateTime
no setter
value int
final
workerId int
no setter

Methods

compareTo(Snowflake other) int
Compares this object to another object.
override
isAfter(Snowflake other) bool
isAtSameMomentAs(Snowflake other) bool
isBefore(Snowflake other) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator +(Duration duration) Snowflake
operator -(Duration duration) Snowflake
operator <(Snowflake other) bool
operator ==(Object other) bool
The equality operator.
override
operator >(Snowflake other) bool

Static Properties

ACEpoch DateTime
Aria's Creations Epoch
final
DiscordEpoch DateTime
Discord Epoch
final
ZERO Snowflake
final