सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
gpt_markdown एक शक्तिशाली Flutter पैकेज है जो समृद्ध टेक्स्ट समर्थन के साथ मार्कडाउन और लैटेक्स को रेंडर करता है, जिसमें गणितीय व्यंजक, तालिकाएँ, लिंक और पाठ चयन शामिल हैं। चैट इंटरफेस और AI-आधारित एप्लिकेशन के लिए डिज़ाइन किया गया है, जो Android, iOS, Web, macOS, Windows और Linux पर उच्च गुणवत्ता वाले फॉर्मेटिंग को प्रदान करता है। इस पैकेज के कारण ChatGPT या Gemini जैसे एप्लिकेशन में उपयोगकर्ता अनुभव में सुधार होता है, क्योंकि यह संरचित सामग्री को गतिशील अंतरक्रिया के साथ सटीक रूप से प्रदर्शित करता है।
उपयोग
AI चैट इंटरफेस
दस्तावेज़ रेंडरिंग
गणितीय सामग्री प्रदर्शन
इंटरैक्टिव वेब-आधारित नोट्स
क्रॉस-प्लेटफॉर्म ऐप सामग्री
समृद्ध पाठ संदेश
मुख्य विशेषताएँ
LaTeX गणित रेंडरिंग का समर्थन करता है
पूर्ण मार्कडाउन सिंटैक्स संगतता
पाठ चयन और कॉपी करना
प्रतिक्रियाशील तालिका लेआउट
क्रॉस-प्लेटफॉर्म सुसंगतता
उच्च प्रदर्शन रेंडरिंग
इनके लिए उपयुक्त
AI चैट ऐप बनाने वाले डेवलपर्स
गणित सामग्री वाले शैक्षिक प्लेटफॉर्म
तकनीकी दस्तावेज़ दर्शक
सामग्री से भरपूर मोबाइल और वेब ऐप्स
स्थिर मार्कडाउन आउटपुट की आवश्यकता वाली टीमें
विचार योग्य बातें
अविश्वसनीय इनपुट का सावधानीपूर्वक निपटान आवश्यक है
बहुत बड़े दस्तावेज़ों के लिए अनुकूलन की आवश्यकता हो सकती है
LaTeX रेंडरिंग बाह्य निर्भरता पर निर्भर करता है
उन्नत स्टाइलिंग के लिए सीमित कस्टमाइजेशन
स्थिर या आधा-गतिशील सामग्री के लिए सबसे उपयुक्त
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
gpt_markdown
The Flutter renderer for AI output.
Production-grade Markdown and LaTeX rendering for streaming Flutter AI interfaces.
Render rich assistant replies, math, code, tables, citations, images, and custom inline UI in one widget.
Built for AI output — Markdown, LaTeX, code blocks, tables, citations, images, task lists, and mixed rich content in one response.
Streaming that stays fast — settled segments are reused while the live tail updates. At 12 KB, each update is 31× faster than in 1.2.1—or 74× faster with the lazy sliver. See the benchmarks.
Production-level control — style sheets, Flutter theme extensions, component builders, callbacks, and custom components.
Extensible inline UI — add @mentions, #channels, :emoji:, issue references, and product-specific syntax without forking the renderer.
Designed for real-world edge cases — RTL, text scaling, selection, malformed Markdown, autolinks, nested content, reduced motion, Flutter web, and WASM.
🧩 Everything AI output needs
Rendering
Production experience
Extensibility
📝
Rich Markdown
⚡
Adaptive streaming
🎨
Component style sheet
∑
Inline and block LaTeX
🚀
Lazy sliver rendering
🧱
Structural builders
💻
Syntax-highlighted code
♿
Selection and text scaling
🏷️
Mentions, channels, and emoji
📊
Tables and aligned columns
🌍
RTL, web, and WASM
🧩
Custom components and scopes
🔗
Links, autolinks, and images
🌓
Theme-aware rendering
👆
Interaction callbacks
☑️
Lists, tasks, and citations
🛡️
Graceful malformed input
📱
Custom URL schemes
🖼️ What it renders
Every image is one GptMarkdown widget with no styling applied — the defaults, in a dark theme. Click any of them for full size.
Rich text Headings, emphasis, lists, quotes, rules, autolinks.
LaTeX Inline and display equations, on the text baseline.
The reveal adapts to incoming text, finishes when generation ends, and respects reduced-motion settings. See the streaming guide for animation modes and configuration.
For long responses and documents, use SliverGptMarkdown inside a
CustomScrollView. It creates spans and widgets only for the segments requested
by the viewport, including its cache extent. The regular GptMarkdown widget is
cheaper for short content and remains the option for character reveal. See the
rendering architecture guide.
Use \( ... \) for inline LaTeX and \[ ... \] for block equations. Enable dollar-sign syntax with useDollarSignsForLatex: true. Code fences include syntax highlighting, language labels, and copy controls.
Wrap the renderer with SelectionArea when selectable output is needed:
SelectionArea(
child: GptMarkdown(reply),
)
🎨 Make it match your product
Use style objects for appearance and builders when you need to replace structure.
Set styles app-wide with GptMarkdownThemeData. Use builders such as codeBuilder, tableBuilder, and imageBuilder to replace components, or span-based builders for links, citations, and inline code. See customization.
🏷️ App-specific inline UI
Render mentions, channels, emoji, issue references, and other product syntax alongside Markdown:
Only known channel names are matched, longest-first. Patterns exclude link labels by default; unrecognized tokens such as #2959 remain text.
Use blockComponents for custom blocks and inlineDirectives for payloads the parser must leave untouched. See custom components.
Upgrading? Passing components or inlineComponents, even an empty list, selects the deprecated legacy parser. Replace them to use the new pipeline. See the migration guide and changelog.
🔗 Autolinks
Bare URLs, www. hosts, emails, and angle autolinks work automatically. Add custom schemes with autolinkSchemes: const {'myapp'}, or disable autolinking with autolink: false. Explicit [label](url) links still work. See inline syntax.