markdown_docs library
Classes
- AutolinkExtensionSyntax
-
Matches autolinks like
http://foo.com
. - AutolinkSyntax
-
Matches autolinks like
<http://foo.com>
. - BlockHtmlSyntax
- Parses inline HTML at the block level. This differs from other Markdown implementations in several ways:
- BlockParser
- Maintains the internal state needed to parse a series of lines into blocks of Markdown suitable for further inline parsing.
- BlockQuote
- A BlockQuote element.
- BlockquoteSyntax
-
Parses email-style blockquotes:
> quote
. - BlockSyntax
- Bold
- A Bold text element.
- Checkbox
- A Checkbox element.
- Code
- A Code element.
- CodeBlock
- A CodeBlock element.
- CodeBlockSyntax
- Parses preformatted code blocks that are indented four spaces.
- CodeSyntax
- Matches backtick-enclosed inline code blocks.
- ColorSwatchSyntax
- Matches code blocks containing a subset of CSS color syntax.
- Delimiter
- A delimiter indicating the possible "open" or possible "close" of a tag for a DelimiterSyntax.
- DelimiterRun
- An implementation of Delimiter which uses concepts of "left-flanking" and "right-flanking" to determine the values of canOpen and canClose.
- DelimiterSyntax
-
Matches syntax that has a pair of tags and becomes an element, like
*
for<em>
. Allows nested tags. - DelimiterTag
- Document
- Maintains the context needed to parse a Markdown document.
- DummyBlockSyntax
- Walks the parser forward through the lines does not match any BlockSyntax.
- EmailAutolinkSyntax
-
Matches autolinks like
<foo@bar.example.com>
. - EmojiSyntax
-
Matches GitHub Markdown emoji syntax like
:smile:
. - EmphasisSyntax
- EmptyBlockSyntax
- EscapeSyntax
- Escape punctuation preceded by a backslash.
- ExtensionSet
- ExtensionSets provide a simple grouping mechanism for common Markdown flavors.
- FencedBlockquoteSyntax
-
Parses lines fenced by
>>>
to blockquotes - FencedCodeBlock
- A FencedCodeBlock element.
- FencedCodeBlockSyntax
- Parses preformatted code blocks between two ~~~ or ``` sequences.
- FlutterRenderer
- Translates a parsed AST to Flutter.
- Header
- A Header element.
- HeaderSyntax
-
Parses atx-style headers:
## Header ##
. - HorizontalRule
- A HorizontalRule element.
- HorizontalRuleSyntax
-
Parses horizontal rules like
---
,_ _ _
,* * *
, etc. - Image
- ImageSyntax
-
Matches images like
![alternate text](url "optional title")
and![alternate text][label]
. - InlineLink
- InlineParser
- Maintains the internal state needed to parse inline span elements in Markdown.
- InlineSyntax
- Represents one kind of Markdown tag that can be parsed.
- Italic
- A Italic text element.
- LineBreakSyntax
- Represents a hard line break.
- Link
- A Link element.
- LinkReference
- A link reference definition.
- LinkSyntax
-
Matches links like
[blah][label]
and[blah](url)
. - ListItem
- ListParagraph
- A ListParagraph element.
- ListSyntax
- Base class for both ordered and unordered lists.
- Node
- Base class for any AST item.
- NodeVisitor
- Visitor pattern for the AST.
- OrderedList
- A OrderedList element.
- OrderedListItem
- A OrderedListItem element.
- OrderedListSyntax
- Parses ordered lists.
- OrderedListWithCheckboxSyntax
- Parses ordered lists with checkboxes.
- Paragraph
- A Paragraph element.
- ParagraphSyntax
- Parses paragraphs of regular text.
- SetextHeaderSyntax
- Parses setext-style headers.
- SimpleDelimiter
- A simple delimiter implements the Delimiter interface with basic fields, and does not have the concept of "left-flanking" or "right-flanking".
- Strikethrough
- A Strikethrough text element.
- StrikethroughSyntax
- Matches strikethrough syntax according to the GFM spec.
- Table
- A Table element.
- TableCell
- A TableCell element.
- TableHeader
- A TableHeader element.
- TableRow
- A TableRow element.
- TableSyntax
- Parses tables.
- Text
- A plain Text element.
- TextSyntax
- Matches stuff that should just be passed through as straight text.
- UnorderedList
- A UnorderedList element.
- UnorderedListItem
- A UnorderedListItem element.
- UnorderedListSyntax
- Parses unordered lists.
- UnorderedListWithCheckboxSyntax
- Parses unordered lists with checkboxes.
- UnparsedContent
- Inline content that has not been parsed into inline nodes (strong, links, etc).
Enums
- HeaderLevel
- The header level.
- TableCellAlignment
- TaskListItemState
Functions
-
markdownToFlutter(
String markdown, {Iterable< BlockSyntax> blockSyntaxes = const [], Iterable<InlineSyntax> inlineSyntaxes = const [], ExtensionSet? extensionSet, Resolver? linkResolver, Resolver? imageLinkResolver, bool inlineOnly = false, bool withDefaultBlockSyntaxes = true, bool withDefaultInlineSyntaxes = true}) → String - Converts the given string of Markdown to Flutter code.
-
renderToFlutter(
List< Node> nodes) → String -
Renders
nodes
to Flutter.