flutter_ai_chat_markdown 0.1.1
flutter_ai_chat_markdown: ^0.1.1 copied to clipboard
A rich markdown renderer for Flutter AI chat apps. Supports streaming, math (LaTeX), chemistry (mhchem), biology sequences, charts, syntax highlighting, and full theming.
0.1.1 #
- Initial release.
MarkdownRendererwidget with streaming support (throttled rebuild, stable block keys).MarkdownThemesystem withchatGptLightandchatGptDarkpresets, fullcopyWith().MarkdownThemeScopeInheritedWidget for app-level theme injection.- Block renderers: headings (H1–H6), paragraph (bold/italic/inline code/strikethrough), ordered/unordered/task lists, blockquote with callout admonitions (NOTE/WARNING/TIP/IMPORTANT/CAUTION).
CodeBlock: syntax highlighting viaflutter_highlight, copy button, language label, collapsible for >50 lines, horizontal scroll.TableBlock: horizontal scroll, zebra striping, long-press copy (cell / row / TSV / Markdown).MathBlock: inline$...$and block$$...$$viaflutter_math_fork, error fallback.ChemBlock: mhchem\ce{}transform — subscripts, superscripts, arrows, ion charges.BioBlock: color-coded DNA / RNA / protein sequences, GC% stat, sequence length, copy.ChartBlock: bar, line, area, pie, scatter, radar charts from JSON fence viafl_chart.ImageBlock:cached_network_imagewith shimmer,photo_viewhero zoom.SafeLink: scheme allowlist + unknown-domain confirmation dialog.ClipboardHelper: copy text with SnackBar feedback.- Extension API (
MarkdownExtension) for plugging in custom fence-tag renderers. Preprocessor: EOL normalisation, unclosed fence repair for streaming, smart-quote conversion.BlockSplitter: splits raw markdown into stable blocks + streaming tail block.
