nextCharacter method
The delay before the next typed character, with typingJitter applied.
Implementation
Duration nextCharacter(Random random) {
if (perCharacter == Duration.zero || typingJitter == 0) {
return perCharacter;
}
final double spread = (random.nextDouble() * 2 - 1) * typingJitter;
final int micros = (perCharacter.inMicroseconds * (1 + spread)).round();
return Duration(microseconds: max(0, micros));
}