cuidConfig function
Creates a generator with the given options.
length
optional sets the length of the generated IDs (default is 24).
counter
optional custom session counter function. Ex. with increments of 5:
myCounter(int start) => () => count+=5;
final config = cuidConfig(counter: myCounter(3));
fingerprint
optional custom fingerprint function:
String myfingerprint() => "uniqueFingerprint123";
final config = cuidConfig(fingerprint: myfingerprint);
secure
optional uses Random.secure() when set to true (if available), otherwise (default & fallback) it uses Random()
Implementation
Cuid cuidConfig(
{int length = 24,
int Function()? counter,
String Function()? fingerprint,
bool secure = false}) =>
Cuid(length, secure, counter, fingerprint);