generateId function
Implementation
String generateId([String? chars, int? length]) {
chars ??= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0987654321";
length ??= 18;
String id = "";
int count = 0;
final rad = Random();
while (count <= length) {
final index = rad.nextInt(length);
id += chars[index];
count += 1;
}
return id;
}