getTotalDuration method
Returns the total duration needed to animate all charCount characters.
charCount — number of characters in the text.
Implementation
Duration getTotalDuration(int charCount) {
return duration + delayBetweenChars * charCount;
}