gpt_markdown
1.4.1, released 2 weeks ago by useval.io
Powerful Flutter Markdown and LaTeX renderer built for AI streaming outputs.
What it does
Renders rich Markdown, LaTeX, code blocks, tables, images, and custom inline UI in a single Flutter widget. It is specifically optimized for streaming AI responses from services like ChatGPT and Claude.
AI-written summary of version 1.4.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a chat application or AI copilot that requires streaming LLM responses.
- You need to render both Markdown and inline/block LaTeX mathematics.
- You want customizable components, syntax-highlighted code blocks, and table support.
Skip it when
- You only need to display simple plain text without formatting.
- You are not targeting Flutter platforms or your environment is restricted from package dependencies like highlight and latex.
Strengths
- Built for fast, flicker-free streaming AI output with lazy rendering and segment reuse.
- Combines Markdown, syntax highlighting, and LaTeX rendering out of the box.
- Extensible through style sheets, component builders, and custom inline patterns.
Weaknesses
- Requires specific newer Flutter and Dart SDK versions.
- Advanced custom component styling requires learning the package's extension APIs.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 7
Simply add the dependency to pubspec.yaml and import it.
import 'package:gpt_markdown/gpt_markdown.dart';
GptMarkdown(
reply,
onLinkTap: (url, title) => openUrl(url),
)Alternatives
Packages that do the same job and could replace gpt_markdown.
- flutter_md
Fast Markdown parser and canvas renderer for Flutter with text selection and streaming.
82Compare - flutter_markdown_plus
A Markdown renderer widget for Flutter to display rich text from plain text data.
77Compare - selectable
A widget that enables text selection across multiple text widgets.
77Compare - flutter_link_previewer
Customizable Flutter widget to fetch and render URL link previews.
91Compare
Works with
Packages commonly used together with gpt_markdown: ones it builds on, ones built on it, and its own family.
- xmlgpt_markdown depends on itFull-featured XML and XPath library for DOM parsing, SAX streaming, and fluent building.
- flutter_svggpt_markdown depends on itRenders Scalable Vector Graphics (SVG 1.1) and precompiled vector graphics in Flutter.
- material_uigpt_markdown depends on itOfficial Flutter Material UI library implementing Google’s Material Design system.
- val_highlight_fluttergpt_markdown depends on itFlutter widgets for displaying and editing syntax-highlighted code.
- val_latex_fluttergpt_markdown depends on itRender LaTeX math formulas, inline math, and Markdown with math in Flutter.
- val_highlightgpt_markdown depends on itSyntax highlighter in pure Dart for 55 languages, themes, incremental updates, and HTML output.
- flutter_streaming_text_markdownBuilt on gpt_markdownStream LLM responses into Flutter as live markdown with typewriter animations and markdown support.
- cometchat_chat_uikitBuilt on gpt_markdownPrebuilt UI components for text chat, media messaging, and voice/video calls.