-
public final class StreamingTextKt
-
-
Method Summary
-
-
Method Detail
-
StreamingText
@Composable() final static Unit StreamingText(String text, Boolean animate, Long chunkDelayMs, Function1<String, Unit> content)
A composable that wraps content and provides streaming animation. Progressively reveals text content word-by-word and whitespace chunk-by-chunk.
Behavior when animate is true:
Every change to the text animates progressively
If the change is new text (doesn't start with previous), animates from the beginning
If the change is a continuation (next text starts with previous text), continues from current position
Behavior when animate is false:
Displays full text immediately
If transitioning from true to false mid-animation, completes the current animation first
- Parameters:
text- The full text content to displayanimate- Whether to animate the text reveal.chunkDelayMs- Delay in milliseconds between each chunk reveal.content- The composable content that will receive the animated text as displayedText
-
-
-
-