fat_markdown 0.9.1
fat_markdown: ^0.9.1 copied to clipboard
A powerful Flutter Markdown widget with LaTeX math and syntax highlighting.
fat_markdown #
A powerful Flutter Markdown widget with LaTeX math and syntax highlighting.
Features #
- π Full GitHub-Flavoured Markdown (GFM)
- β Inline and block LaTeX via
flutter_math_fork - π¨ Syntax highlighting for 14 languages (Dart, JS/TS, Python, Go, Rust, SQLβ¦)
- π Automatic light/dark theme detection for code blocks
- π Copy-to-clipboard button in every code block
- πΌοΈ Image tap handler with gallery support
- π Tables with stretch/scroll mode
- β GitHub-style checkboxes
- π Tappable links
- π Built-in tree-view debug mode
- π¨ Fully themeable via
FatMarkdownTheme(ThemeExtension)
Installation #
dependencies:
fat_markdown: ^0.9.1
Usage #
import 'package:fat_markdown/fat_markdown.dart';
FatMarkdown(
data: '# Hello\n\nThis is **fat** markdown with $E=mc^2$.',
onLinkTap: (url) => launchUrl(Uri.parse(url)),
onImageTap: (url, allImages) { /* open gallery */ },
)
Theming #
Customise via FatMarkdownTheme in your ThemeData.extensions:
MaterialApp(
theme: ThemeData(
extensions: [
FatMarkdownTheme(
codeFontSize: 14,
tableStretch: true,
codeBlockDividerColor: Colors.transparent, // hide divider
),
],
),
)
Debug Mode #
Inspect the parsed AST with the built-in tree-view:
FatMarkdown(
data: markdownString,
mode: FatMarkdownMode.treeview,
)
License #
MIT Β© 2026 damphat