randomString function
Implementation
String randomString(int length, {bool? numbersOnly, Random? rnd}) {
rnd ??= Random(DateTime.now().millisecondsSinceEpoch);
String result = "";
final source = numbersOnly == true ? numbers : chars;
for (var i = 0; i < length; i++) {
result += source[rnd.nextInt(source.length)];
}
return result;
}