SequentialIdGenerator class

Sequential implementation of generator that will use seed as prefix and sequential number as suffix in form of "prefix--153"

Implemented types

Constructors

SequentialIdGenerator(String _prefix)
Initializes sequential generator with prefix. Please don't use in any other way that creating and binding it at the top level of app, otherwise it does not provide guarantees of uniqueness if code is used in multiple apps advantage of using this one - shorter ids disadvantage - user's mistake can cause clashes
SequentialIdGenerator.fromUUID()
Initializes sequential generator with UUID v4 prefix https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_.28random.29 These are probably unique (you need to generate 2^36 to have clash with 4*10^-16 probability) so it can be freely used anywhere across the app advantage: very likely to be unique without extra restrictions disadvantage: long ids

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

nextId() String
Returns next id.
override
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