IdGeneratorService class

Domain layer service for generating various types of IDs and encodings.

Constructors

IdGeneratorService({Random? random})
Constructor with optional Random instance for testing.

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

encodeToBase64(List<Object?> objects) String
Encodes a list of objects to a Base64 string after JSON serialization.
generateNanoid({int size = 21}) String
Generates a nanoid-style random ID with a custom alphabet.
generateRandomString({int length = 8, bool useLetters = true, bool useNumbers = true, bool useSymbols = true}) String
Generates a random string with configurable character sets.
generateTimestampId() String
Generates a timestamp-based ID with prefix 'G'.
generateUuidV1() String
Generates a UUID v1-like ID with a random structure.
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