gpt_markdown library

Classes

ATagMd
Link text component
AutolinkMd
Bare URLs, www. hosts, email addresses and <...> autolinks.
BlockMd
Block component
BlockQuote
Block quote component
BlockQuoteStyle
How a blockquote is drawn.
BoldMd
Bold text component
CheckBoxMd
Checkbox component
CheckboxStyle
How a task-list checkbox or radio button is drawn.
CodeBlockMd
CodeBlockStyle
How a fenced code block is drawn.
CodeTextSpan
A TextSpan carrying inline code, tagged so the paragraph can find it and paint a chip behind it.
CustomTableColumnWidth
A custom table column width.
CustomTableField
CustomTableRow
GptMarkdown
This widget create a full markdown widget as a column view.
GptMarkdownConfig
A configuration class for the GPT Markdown component.
GptMarkdownStyleSheet
Per-component appearance, in one object.
GptMarkdownTheme
Wrap a Widget with GptMarkdownTheme to provide GptMarkdownThemeData in your intiar app.
GptMarkdownThemeData
Theme defined for GptMarkdown widget
HeadingStyle
How a # heading is drawn.
HighlightedText
HrLine
Horizontal line component
HrStyle
How a horizontal rule is drawn.
HTag
Heading component
ImageMd
Image component
ImageStyle
How an image is drawn.
IndentMd
Indent component
InlineCodeRun
A resolved inline-code run: a range of the paragraph's plain text, and the style its chip is drawn with.
InlineCodeStyle
How inline code is drawn.
InlineMd
Inline component
InlinePattern
A consumer-defined inline syntax, matched and rendered alongside the built-in Markdown components.
InlinePatternMd
Adapts an InlinePattern to the MarkdownComponent pipeline.
ItalicMd
Italic text component
LatexMath
Italic text component
LatexMathMultiLine
LatexStyle
How rendered maths is drawn.
LinkStyle
How a link is drawn.
ListStyle
How ordered and unordered list items are drawn.
MarkdownComponent
Markdown components
MdWidget
It creates a markdown widget closed to each other.
NewLines
OrderedList
Ordered list component
RadioButtonMd
Radio Button component
RevealEngine
Counters for a character-by-character reveal.
SourceTag
source text component
SourceTagStyle
How a [1] citation chip is drawn.
StreamingMarkdown
Reveals text progressively, rebuilding only the part that can still change.
StrikeMd
TableMd
Table component
TableStyle
How a table is drawn.
UnderLineMd
UnOrderedList
Unordered list component

Enums

GptMarkdownAnimation
How newly arrived Markdown appears.
MarkdownScope
The nesting context a MarkdownComponent is being rendered in.

Mixins

InlineCodeDecoration
Paints a rounded chip behind every inline-code run, once per line fragment.

Constants

kGptMarkdownFontPackage → const String
The package that ships kGptMarkdownMonoFontFamily.
kGptMarkdownMonoFontFamily → const String
The monospace family bundled with this package, also used by code blocks.

Functions

baselineWidgetSpan(Widget child) WidgetSpan
Wraps child in a WidgetSpan that sits on the surrounding text baseline.
buildLinkSpan(BuildContext context, GptMarkdownConfig config, {required String url, required String label, bool parseLabel = true}) InlineSpan
Builds the span for a link, shared by ATagMd and AutolinkMd.
collectInlineCodeRuns(InlineSpan root) List<InlineCodeRun>
Every CodeTextSpan in root, as plain-text ranges.
resolvedStyleSheet(BuildContext context, GptMarkdownConfig config) GptMarkdownStyleSheet
The style sheet in force: the widget's, merged over the theme's, field by field, with anything still unset resolved to the package default.
scaledWidgetSpan({required Widget child, required GptMarkdownConfig config, PlaceholderAlignment alignment = PlaceholderAlignment.baseline, TextBaseline? baseline = TextBaseline.alphabetic}) WidgetSpan
A WidgetSpan for an inline widget.
settledSplitOffset(String source) int
The offset of the last blank line that is safe to split at, or 0 when the whole document has to stay together.

Typedefs

BlockQuoteBuilder = Widget Function(BuildContext context, Widget content, BlockQuoteStyle style)
Builds the widget for a blockquote.
CheckboxBuilder = Widget Function(BuildContext context, bool checked, Widget content, CheckboxStyle style)
Builds the widget for a task-list checkbox and its label.
CodeBlockBuilder = Widget Function(BuildContext context, String name, String code, bool closed)
A builder function for the code block.
HeadingBuilder = Widget Function(BuildContext context, int level, Widget content, HeadingStyle style)
Builds the widget for a # heading.
HighlightBuilder = Widget Function(BuildContext context, String text, TextStyle style)
A builder function for the highlight.
HrBuilder = Widget Function(BuildContext context, HrStyle style)
Builds the widget for a horizontal rule.
ImageBuilder = Widget Function(BuildContext context, String imageUrl, double? width, double? height)
A builder function for the image.
InlineCodeBuilder = InlineSpan Function(BuildContext context, String code, TextStyle style, InlineCodeStyle codeStyle)
Builds the span for one run of inline `code`.
InlinePatternBuilder = InlineSpan Function(BuildContext context, RegExpMatch match, TextStyle style)
Builds the span for a single InlinePattern match.
LatexBuilder = Widget Function(BuildContext context, String tex, TextStyle textStyle, bool inline)
A builder function for the LaTeX.
LinkBuilder = Widget Function(BuildContext context, InlineSpan text, String url, TextStyle style)
A builder function for the link.
OrderedListBuilder = Widget Function(BuildContext context, String no, Widget child, GptMarkdownConfig config)
A builder function for the ordered list.
RadioOptionBuilder = Widget Function(BuildContext context, bool checked, Widget content, CheckboxStyle style)
Builds the widget for a radio option and its label.
SourceTagBuilder = Widget Function(BuildContext context, String text, TextStyle style)
A builder function for the source tag.
StreamingMarkdownBuilder = Widget Function(BuildContext context, String text)
Builds the Markdown for a slice of the source.
TableBuilder = Widget Function(BuildContext context, List<CustomTableRow> tableRows, TextStyle textStyle, GptMarkdownConfig config)
A builder function for the table.
UnOrderedListBuilder = Widget Function(BuildContext context, Widget child, GptMarkdownConfig config)
A builder function for the unordered list.