gpt_markdown
library
Mixins
-
InlineCodeDecoration
-
Paints a rounded chip behind every inline-code run, once per line fragment.
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.