getRandomChar method
Returns a random character from this string. Audited: 2026-06-12 11:26 EDT
Implementation
@useResult
String getRandomChar() {
if (isEmpty) {
return '';
}
final int index = DateTime.now().microsecondsSinceEpoch % length;
return this[index];
}