getRandomChar method
Returns a random character from this string.
Implementation
@useResult
String getRandomChar() {
if (isEmpty) {
return '';
}
final int index = DateTime.now().microsecondsSinceEpoch % length;
return this[index];
}
Returns a random character from this string.
@useResult
String getRandomChar() {
if (isEmpty) {
return '';
}
final int index = DateTime.now().microsecondsSinceEpoch % length;
return this[index];
}