Package 

Class StreamingTextKt

    • Method Summary

      Modifier and Type Method Description
      final static Unit StreamingText(String text, Boolean animate, Long chunkDelayMs, Function1<String, Unit> content) A composable that wraps content and provides streaming animation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 display
        animate - 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