PackageTrack
Sign in Get early access

flutter_streaming_text_markdown

A Flutter package for beautiful LLM text streaming with markdown support. Perfect for ChatGPT-like interfaces with typing animations, RTL support, and customizable effects.

1.9.1 12K downloads/mo #2676 most downloaded on pub.dev hooshyar/flutter_streaming_text_markdown

What this package is like to depend on

Last release 1 months ago

09 Jul 2026

Ships unpredictably

gaps range from 8 days to 6 months

Nearly every release is documented

notes for 19 of 20 stable releases

Nothing withdrawn

no release was ever pulled

2 years old

20 releases · first in 2025

11 releases in the last 12 months

see the full history below

Release timeline

20 releases · Jan 2025 to Jul 2026
2026
Release Pre-release

Releases

latest 20
  1. 1.9.1 09 Jul 2026
    Release notes

    Fixed

    Stream-mode engine rewrite — chunks now animate instead of rendering instantly

    The stream: parameter (added in 1.9.0) had several rough edges once real LLM traffic hit it. This release rewrites the streaming engine and tightens the surrounding lifecycle:

    • Chunks now animate per typingSpeed/chunkSize/wordByWord instead of being dumped onto the screen the instant they arrive. wordByWord now correctly holds back a trailing partial word at a chunk boundary until the next whitespace or stream close, so words no longer visibly split mid-token.
    • onComplete/controller.markCompleted() now fire exactly once — only once the stream itself has closed and the displayed text has caught up to everything received. Previously these could double-fire or fire before the last chunk had finished animating in.
    • controller.progress now updates correctly during streaming. It was previously stuck at 0 for the entire stream and only jumped to 1.0 on completion.
    • Tap-to-complete and controller.skipToEnd() are now stream-safe. In stream mode, both now instantly catch the displayed text up to whatever has been received so far — they never erase already-streamed content. They only trigger full completion if the underlying stream has already closed; previously tapping mid-stream wiped all streamed text and could double-fire onComplete.
    • didUpdateWidget now detects a stream instance swap (e.g. a chat UI moving on to the next message). Previously swapping in a new Stream<String> was silently ignored and its content never appeared. The old subscription is now properly torn down and the new one subscribed — including the stream → null and null → stream transitions.
    • autoScroll (on StreamingTextMarkdown) now pins to the bottom as content grows during animation/streaming, not only once at the very end. Backed by a new optional onTextChanged callback on StreamingText.
    • Removed a phantom repeating cursor-blink AnimationController ticker that ran continuously with nothing ever rendering it — a source of needless battery drain and a cause of pumpAndSettle hangs in tests.

    Code-fence render stability while typing. While a ``` code fence was still being typed, its raw backtick markers rendered as literal text; the instant the closing fence completed, gpt_markdown reformatted the block as a styled code widget, stripping those markers — the visible text shrank by a few characters at that exact moment, reading as a stutter/flicker on top of the typing animation. The markdown render now withholds a trailing unclosed fence until it balances, so code blocks only ever appear in their final styled form. Typing position, progress, and completion timing are unchanged — this affects display only.

    Open source →
  2. 1.9.0 31 May 2026
    Release notes

    v1.9.0: Stream support + completeAnimationOnTap (PR #15)

    Open source →
    Release notes

    New Features

    StreamingTextMarkdown now accepts a Stream<String> directly

    The headline widget finally lives up to its name. You can pass a stream: parameter to StreamingTextMarkdown (and every preset constructor) instead of dropping down to the lower-level StreamingText. Each chunk emitted by the stream is appended to the rendered text and animated using the active typing settings.

    StreamingTextMarkdown(
      stream: openAiChat(prompt),     // Stream<String> from your LLM client
      markdownEnabled: true,
      trailingFadeEnabled: true,      // recommended for streams
      onComplete: () => setState(() => _isStreaming = false),
    )
    
    • streamStream<String>?. When non-null, takes over from text and content arrives via the stream.
    • text is now optional (defaults to ''). Existing code passing text: keeps working unchanged.
    • Per-character fadeInEnabled is automatically suppressed when stream is set (one AnimationController per glyph on an unbounded stream would exhaust memory). Use trailingFadeEnabled for a smooth gradient reveal.
    • Available on every constructor: default, .chatGPT(), .claude(), .typewriter(), .instant(), .fromPreset(). Non-breaking.

    README has new copy-pasteable bridges for OpenAI Chat Completions and Anthropic Messages SSE → Stream<String>.

    Opt out of tap-to-complete (PR #15, thanks @AdamBurnett-Tonal)

    • New completeAnimationOnTap flag (bool, defaults to true). By default, tapping the widget while it animates jumps straight to the finished text — set this to false to let the animation play through uninterrupted regardless of taps.
    • Available on StreamingTextMarkdown, every preset constructor, and the lower-level StreamingText. Non-breaking — existing behavior is the default.
    Open source →
  3. 1.8.0 15 May 2026
    Release notes

    New Features

    Custom markdown components (closes #13)

    You can now override how gpt_markdown renders any markdown element — headers, lists, bold, italic, tables, strikethrough, etc. — by passing your own MarkdownComponent lists.

    StreamingTextMarkdown(
      text: '# Custom heading\n**bold** *italic*',
      markdownEnabled: true,
      components: [
        MyCustomHeader(),
        MyCustomList(),
        // ...
      ],
      inlineComponents: [
        MyCustomBold(),
        MyCustomItalic(),
      ],
    )

    Both params are List<MarkdownComponent>? and forward as-is to GptMarkdown. Defaults to null → uses gpt_markdown's built-in component list.

    Available on every constructor: default, .chatGPT(), .claude(), .typewriter(), .instant(), .fromPreset().

    Non-breaking. No user code changes required.

    Pub.dev

    https://pub.dev/packages/flutter_streaming_text_markdown/versions/1.8.0

    Open source →
    Release notes

    New Features

    Custom markdown components (closes #13)

    Expose gpt_markdown's component lists so you can override how block- and inline-level markdown elements are rendered — headers, lists, bold, italic, tables, etc. Both parameters are forwarded as-is to the underlying GptMarkdown widget; passing null (the default) keeps gpt_markdown's built-in component list.

    • componentsList<MarkdownComponent>?, block-level overrides (headers, lists, code blocks, tables, …)
    • inlineComponentsList<MarkdownComponent>?, inline-level overrides (bold, italic, strikethrough, links, …)

    Available on every constructor — default, .chatGPT(), .claude(), .typewriter(), .instant(), .fromPreset(). Non-breaking.

    Open source →
  4. 1.7.3 14 May 2026
    Release notes

    Bug fixes

    • Fix pub.dev static analysis failure causing 90/160 score. gpt_markdown 1.1.7 changed the ImageBuilder typedef from 2 args to 4 args (added optional width/height parsed from image alt text). Our constraint ^1.1.6 permitted 1.1.7, so pana resolved to it and the imageBuilder argument at streaming_text.dart:1708 failed type-checking — which cascaded into platform-support detection also reporting 0/20. Bumped the dependency to ^1.1.7 and added a thin internal adapter so the public imageBuilder(BuildContext, String) signature stays unchanged. No user code changes required. Restores full 160/160 pub.dev score.
    Open source →
  5. 1.7.2 04 May 2026
    Release notes

    v1.7.2 — fix trailing fade dismiss on completion (closes #12)

    Open source →
    Release notes

    Bug fixes

    • Trailing fade now actually dismisses on completion (closes #12). Previously the trailing-edge gradient would stay applied forever after typing/streaming finished — _triggerTrailingFade() was called during streaming via _updateProgress, but every completion path set _isComplete = true without re-triggering the dismiss animation. Centralized completion through a new _handleCompletion() helper that fires onComplete and triggers the fade-out together. Affected all 11 completion sites (typing finish, stream onDone, skip-to-end, tap-to-skip, append-completion, etc.).

    Documentation

    • Documented the silent fade-in suppression for streams and Arabic content (#11). fadeInEnabled and stream now have explicit dartdoc on the interaction; README has a "Choosing a fade for streaming content" table.

    Tests

    • Added regression tests covering both completion paths (text prop + Stream<String>) with trailingFadeEnabled: true.
    Open source →
  6. 1.7.1 15 Apr 2026
    Release notes
    • Fix lint info (curly braces) for full 160/160 pub.dev score
    • All trailing fade, Arabic word splitting, and setState fixes included
    Open source →
  7. 1.7.0 12 Apr 2026
    Release notes

    New Features

    Custom markdown builders (closes #10)

    Expose gpt_markdown's builder callbacks so you can customize how images, links, code blocks, and more are rendered inside streaming text.

    • imageBuilder — custom widget for markdown images
    • onLinkTap — callback when a link is tapped
    • codeBuilder — custom widget for code blocks
    • latexBuilder — custom widget for LaTeX expressions
    • sourceTagBuilder — custom widget for source tags
    • highlightBuilder — custom widget for highlighted text
    • linkBuilder — custom widget for links

    All parameters are optional and available on every constructor including .chatGPT(), .claude(), .typewriter(), .instant(), and .fromPreset().

    StreamingTextMarkdown.chatGPT(
      text: response,
      markdownEnabled: true,
      imageBuilder: (context, url) => CachedNetworkImage(imageUrl: url),
      onLinkTap: (url, title) => launchUrl(Uri.parse(url)),
      codeBuilder: (context, name, code, closed) => MyCodeBlock(code: code),
    );
    

    Trailing fade effect — new trailingFadeEnabled parameter

    Optional trailing gradient fade at the bottom edge while text is streaming. The fade holds steady during streaming and smoothly animates away when complete. Opt-in via trailingFadeEnabled: true — disabled by default.

    Bug Fixes

    • Fix emoji character skipping during animation resume (closes PR #9) — _displayedText.length returned UTF-16 code units but was used as an index into grapheme cluster lists, causing characters after emoji to be dropped. Now uses _displayedText.characters.length.
    • Fix Arabic/RTL word splitting — the previous regex stripped Arabic punctuation and hamza (ء) as delimiters and didn't preserve markdown syntax (headers, blockquotes, lists). Now uses the same markdown-aware splitting as LTR text.
    • Fix trailing fade blinking — the trailing gradient was resetting on every animation tick, causing visible flashing. Now holds steady during streaming and animates away once on completion.
    • Fix setState during build in exampleStreamingTextController callbacks in the example's ControllerSection could fire during the build phase. Deferred with addPostFrameCallback.
    Open source →
  8. 1.6.0 04 Apr 2026
    Release notes

    What's New

    ✨ Shimmer loading state (isLoading)

    No more blank screen while waiting for the first LLM token. Set isLoading: true to show an animated skeleton placeholder that seamlessly transitions to streaming text.

    StreamingTextMarkdown.chatGPT(
      text: _accumulatedText,
      isLoading: _waitingForFirstToken,
    )
    • isLoading: false (default) — zero behavior change for existing code
    • shimmerLineCount: 3 — configurable number of skeleton lines
    • Pure Flutter — no external shimmer package needed
    • Auto-adapts to light/dark theme

    🔧 Dependency upgrade

    • gpt_markdown bumped to ^1.1.6 — table column alignment, ordered list fixes, Flutter 3.35 compat, heading style customization

    📝 Documentation

    • Confirmed and documented markdown table support (closes #8)

    Full changelog: https://github.com/hooshyar/flutter_streaming_text_markdown/blob/main/CHANGELOG.md

    Open source →
    Release notes

    ✨ New Features

    Shimmer loading state — isLoading parameter

    Show an animated skeleton placeholder while waiting for the first LLM token (TTFT). No more blank screen between sending a request and the first character appearing.

    • isLoading: false — New parameter on all constructors and named variants. When true, displays an animated shimmer skeleton instead of the text widget. Defaults to false — all existing code is completely unaffected.
    • shimmerLineCount: 3 — Controls how many skeleton lines are shown. Defaults to 3.
    • Pure Flutter implementation — No external shimmer package. Uses AnimationController + LinearGradient sweep. Adapts to light/dark theme automatically.
    • Markdown tables confirmed — gpt_markdown renders tables natively. Added documentation and example.
    // Usage example
    StreamingTextMarkdown.chatGPT(
      text: _accumulatedText,
      isLoading: _waitingForFirstToken,  // true until first token, then false
    )
    

    🔧 Improvements

    • Upgraded gpt_markdown dependency to ^1.1.6 — picks up table column alignment fix, ordered list bug fix, Flutter 3.35 compatibility, and heading style customization fixes
    Open source →
  9. 1.5.0 18 Feb 2026
    Release notes

    What's new in v1.5.0

    Trailing-edge fade animation for all content types

    • Markdown: fadeInEnabled: true now works with markdownEnabled: true
    • RTL/Arabic: Fade animations now work for Arabic and Hebrew text
    • LaTeX: Gentle opacity pulse when streaming block equations

    Revolutionary example page

    Complete rebuild showcasing all 17 package features — live at https://hooshyar.github.io/flutter_streaming_text_markdown/

    Full changelog

    See CHANGELOG.md

    Open source →
    Release notes

    ✨ New Features

    Trailing-edge fade animation for markdown and RTL content

    Previously, fadeInEnabled: true only worked with plain text (markdownEnabled: false). This release brings smooth streaming animations to all content types.

    • Markdown fade-in — When fadeInEnabled: true and markdownEnabled: true, a trailing-edge gradient fade animates at the bottom of the content as new text streams in, using the configured fadeInCurve and fadeInDuration
    • RTL/Arabic support — Fade animations now work correctly with Arabic and Hebrew text (previously disabled for RTL languages)
    • Block LaTeX protection — When streaming inside a $$...$$ block, uses a gentle opacity pulse instead of gradient mask to avoid visually cutting through equations
    • Revolutionary example page — Complete showcase redesign with all 17 package features: named constructors, 9 presets, full controller API, markdown, LaTeX, RTL, theme system, live customization playground, and GitHub Pages deployment
    • GitHub Pages live demo — https://hooshyar.github.io/flutter_streaming_text_markdown/

    🔧 Improvements

    • Example page rebuilt from scratch: 11 files, 1300+ lines, dark/light mode, responsive
    • All links in example are now clickable (pub.dev, GitHub, License)
    • Preset grid shows all 9 LLMAnimationPresets with live mini-previews
    • Controller section demonstrates full StreamingTextController API with progress bar, state display, speed multiplier
    • Added pub.dev badge count in hero section

    ✅ Compatibility

    Fully backward compatible — existing code unchanged. Fade-in for markdown only activates when both fadeInEnabled: true AND markdownEnabled: true are set.


    Open source →
  10. 1.4.0 16 Feb 2026
    Release notes

    ✨ New Features

    This release adds a dedicated markdownStyleSheet property (typed as TextStyle) while maintaining 100% backward compatibility. Includes all v1.3.3 stability fixes.

    • Dedicated Markdown Style Property - Cleaner API for markdown styling (Fixes Issue #5)
      • NEW: StreamingTextTheme.markdownStyleSheet property accepts TextStyle
      • NEW: StreamingTextMarkdown.styleSheet now properly typed as TextStyle?
      • Uses gpt_markdown package for proper markdown rendering
      • Example:
        StreamingTextTheme(
          markdownStyleSheet: TextStyle(
            fontSize: 16,
            fontWeight: FontWeight.w400,
            color: Colors.black87,
          ),
        )
        

    🔄 Backward Compatibility

    • Zero Breaking Changes
      • StreamingTextTheme.markdownStyle still works (deprecated with migration path)
      • Old code using markdownStyle: TextStyle() continues to work perfectly
      • New code can use markdownStyleSheet for a clearer API
      • Migration timeline: v1.4.0 (add markdownStyleSheet) → v2.0.0 (remove markdownStyle)

    📚 Documentation Alignment

    • Fixed Documentation Mismatch - Code now matches README examples
      • README examples now accurately show TextStyle usage
      • API documentation updated to reflect actual types
      • Closes Issue #5 opened Oct 16, 2025

    🔧 Migration Guide

    No migration required! Old code continues to work:

    // Old way (still works, deprecated)
    StreamingTextTheme(
      markdownStyle: TextStyle(fontSize: 16),
    )
    
    // New way (recommended)
    StreamingTextTheme(
      markdownStyleSheet: TextStyle(
        fontSize: 16,
        fontWeight: FontWeight.w400,
        color: Colors.black87,
      ),
    )
    

    🛡️ Includes All v1.3.3 Stability Fixes

    • Fixed setState race conditions (prevents navigation crashes)
    • Fixed timer memory leaks (better long-running app performance)
    • Fixed AnimationController disposal errors
    • Fixed stream double-wrapping issues
    • 500x faster RTL/Arabic text processing
    • Enhanced error handling and debugging

    🎯 Upgrade Recommendation

    Recommended upgrade - Get both new features AND stability improvements:

    dependencies:
      flutter_streaming_text_markdown: ^1.4.0
    

    No code changes required, but you now have access to powerful markdown styling options!


    Open source →
  11. 1.3.2 04 Sep 2025
    Release notes

    ✨ New Features

    • Animation Disable Option - Added animationsEnabled parameter to all constructors allowing complete animation disabling
      • All constructors now support animationsEnabled: false for instant text display
      • Useful for performance-critical scenarios or user accessibility preferences
      • Maintains full compatibility with existing code (defaults to true)

    🔧 Code Quality Improvements

    • Enhanced Static Analysis - Resolved all remaining static analysis warnings for perfect pub.dev scoring
    • Dependency Updates - Updated flutter_lints to 6.0.0 and other dependencies to latest versions
    • Performance Optimizations - Removed unused fields and optimized animation state management

    🧪 Testing

    • Comprehensive Test Coverage - Maintained 63% test coverage with 69 out of 70 tests passing
    • Animation Continuation Tests - Enhanced test suite to verify text append functionality works correctly
    Open source →
  12. 1.3.1 06 Aug 2025
    Release notes

    🐛 Critical Bug Fixes

    • Fixed Issue #3: Markdown Animation Conflict - Resolved critical issue where animations would freeze when markdown was enabled
      • Implemented animation-aware caching system that only caches when animation is complete
      • Added progressive markdown rendering during animation to prevent UI blocking
      • All markdown + animation combinations now work correctly
    • Fixed Issue #1: Animation Restart Bug - Resolved streaming text restarting entire animation instead of continuing from new content
      • Added incremental animation tracking with proper state management
      • Streaming text now continues animation from where it left off instead of restarting
      • Improved performance for real-time streaming scenarios

    🔧 Code Quality Improvements

    • Static Analysis Cleanup - Removed unused variables and fields to achieve perfect static analysis score
    • Formatting - Applied consistent Dart formatting across all source files
    • Performance - Optimized animation state management for better memory efficiency

    🧪 Testing Enhancements

    • Comprehensive Test Coverage - Added extensive test suite covering all reported issues
    • Issue Reproduction Tests - Added specific tests that reproduce and verify fixes for GitHub issues
    • Streaming Behavior Tests - Added tests validating proper incremental streaming animation
    Open source →
  13. 1.3.0 03 Aug 2025
    Release notes

    🔢 LaTeX Support

    • Mathematical Expressions - Added comprehensive LaTeX support for inline ($x^2$) and block ($$E=mc^2$$) mathematical expressions
    • Unicode Conversion - LaTeX expressions are converted to Unicode symbols for proper rendering
    • Atomic Animation - LaTeX expressions are treated as atomic units during streaming animation
    • Theme Integration - Extended StreamingTextTheme with latexStyle, latexScale, and latexFadeInEnabled properties
    • Performance Optimization - LaTeX expressions can disable fade-in animations for better performance

    🔧 Package Architecture Improvements

    • Dependency Migration - Migrated from multiple markdown packages to single gpt_markdown package
    • Word-by-Word Markdown - Fixed markdown rendering issues in word-by-word animation mode
    • Caching System - Added intelligent caching for LaTeX processing and markdown parsing
    • Performance Enhancements - Optimized text processing and animation performance

    🛠️ Developer Experience

    • LaTeX Configuration - Added latexEnabled, latexStyle, latexScale, and latexFadeInEnabled parameters
    • Enhanced Documentation - Comprehensive LaTeX usage examples and configuration guide
    • Test Coverage - Added extensive test suite for LaTeX functionality and integration
    • Example Updates - Updated example app with LaTeX demonstration and scientific content

    🐛 Bug Fixes

    • Unused Import Cleanup - Removed unused gpt_markdown import from streaming_text.dart
    • Animation Consistency - Fixed word-by-word animation with mixed markdown and LaTeX content
    • Memory Management - Improved disposal of LaTeX processing resources
    Open source →
  14. 1.2.1 26 Jul 2025
    Release notes

    🐛 Bug Fixes & Pub.dev Optimization

    • Removed deprecated textScaleFactor - Removed deprecated parameter to fix static analysis warnings
    • Fixed pub.dev scoring - Removed non-existent issue tracker URL to improve pub.dev scoring
    • Code cleanup - Removed TODO comments and improved code documentation
    Open source →
  15. 1.2.0 26 Jul 2025
    Release notes

    🚀 Major Features

    • StreamingTextController - Added programmatic control for pause/resume/skip/restart functionality
    • LLM Animation Presets - Added ChatGPT and Claude-style animation presets optimized for AI text streaming
    • Convenient Constructors - Added StreamingTextMarkdown.chatGPT(), .claude(), .typewriter(), .instant() constructors

    🎯 LLM Integration Enhancements

    • Enhanced package description and tags for better discoverability in LLM use cases
    • Added comprehensive example app showcasing ChatGPT-style, Claude-style, and controller demos
    • Optimized animation speeds and behaviors specifically for AI text streaming scenarios

    🛠️ Developer Experience

    • Added StreamingTextConfig class for reusable animation configurations
    • Added progress tracking and state management through controller callbacks
    • Added animation presets: chatGPT, claude, typewriter, gentle, bouncy, chunks, rtlOptimized, professional
    • Added animation speed enums: slow, medium, fast, ultraFast

    🔧 Technical Improvements

    • Updated deprecated API usage (withOpacitywithValues)
    • Fixed package structure (docs/doc/, added .pubignore)
    • Improved Flutter compatibility and dependency management
    • Enhanced error handling and controller lifecycle management

    📱 Example App Overhaul

    • Complete redesign with 4 tabs: ChatGPT Style, Claude Style, Controller Demo, Custom Settings
    • Real-time streaming simulation with Flutter development content
    • Interactive controller demo showing pause/resume/skip/restart functionality
    • Performance optimizations and modern UI design

    🐛 Bug Fixes

    • Fixed animation disposal and memory management
    • Improved RTL text handling and performance
    • Fixed deprecated API warnings and analysis issues
    Open source →
  16. 1.1.0 07 Feb 2025
    Release notes
    • Added professional theme system with StreamingTextTheme
    • Added support for custom markdown styling through theme extension
    • Added proper theme inheritance and fallback system
    • Added documentation for theme customization
    • Improved style sheet handling in StreamingText widget
    • Made padding configuration more flexible
    • Maintained full backward compatibility
    Open source →
  17. 1.0.2 01 Feb 2025
    Release notes

    docs: update changelog for version 1.0.2

    Open source →
    Release notes

    Improvements

    • 📦 Updated dependencies to latest compatible versions
    • 🔧 Improved package structure and organization
    • 📚 Enhanced API documentation and examples
    • ⚡️ Performance optimizations for text rendering
    Open source →
  18. 1.0.1 18 Jan 2025
    Release notes

    prepare for release v1.0.1

    Open source →
    Release notes

    Improvements

    • 🔄 Updated text scaling implementation to use modern textScaler
    • 📚 Documentation improvements
    • 🐛 Minor bug fixes and performance optimizations
    Open source →
  19. 1.0.0 17 Jan 2025
    Release notes

    Initial stable release 🎉

    Features

    • ✨ Markdown rendering with support for headers, bold, italic, and lists
    • ⌨️ Character-by-character and word-by-word typing animations
    • 🎭 Customizable fade-in animations
    • 🌐 RTL (Right-to-Left) language support
    • 📱 Responsive and customizable design
    • 🎯 Interactive tap-to-complete feature
    • 🔄 Real-time text streaming support
    • 🎨 Customizable styling options

    Improvements

    • 📚 Comprehensive documentation
    • ✅ Full test coverage
    • 🔧 Modern text scaling implementation
    • 🧹 Code cleanup and optimization
    Open source →
  20. 0.0.1 17 Jan 2025

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive