flutter_stream_buffer 0.1.0
flutter_stream_buffer: ^0.1.0 copied to clipboard
Frame-batched text streaming for Flutter AI responses, live captions, and logs. Includes cancellation, bounded accumulation, and a lifecycle-aware builder.
0.1.0 #
Initial release.
StreamTextController: accumulates aStream<String>of text deltas and notifies listeners at most once per display frame. Supports restart, cancellation that keeps partial text, and disposal.StreamTextSnapshot: immutable text, status, received chunk count, error, and stack trace.StreamBufferLimitException: typed error raised when a chunk would exceed the configurablemaxCodeUnitslimit. The whole chunk is rejected and previously accepted text is kept.StreamTextBuilder: widget that owns the controller, reconnects when its stream changes, and cancels when unmounted.- Interactive web example covering burst input, cancellation, failures, and the size limit.