TypewriterState

Drives and observes one typewriter reveal. A state reveals each distinct text once: once a text has fully typed in, binding the same text again (recomposition, configuration change) shows it immediately, while a different text types in again.

revealedChars is snapshot state; the library reads it only in the draw phase, so typing redraws the text without recomposing or re-measuring it.

Properties

Link copied to clipboard

True once the whole bound text is visible.

Link copied to clipboard

Characters revealed so far.

Functions

Link copied to clipboard
fun restart()

Clears the "already ran" flag and types the current text again from the start.

Link copied to clipboard
fun skip()

Reveals everything immediately (e.g. on tap).