Markdown class

A scrolling widget that parses and displays Markdown.

Supports all GitHub Flavored Markdown from the specification.

See also:



Markdown({Key key, @required String data, bool selectable: false, MarkdownStyleSheet styleSheet, MarkdownStyleSheetBaseTheme styleSheetTheme, SyntaxHighlighter syntaxHighlighter, MarkdownTapLinkCallback onTapLink, String imageDirectory, List<BlockSyntax> blockSyntaxes, List<InlineSyntax> inlineSyntaxes, ExtensionSet extensionSet, MarkdownImageBuilder imageBuilder, MarkdownCheckboxBuilder checkboxBuilder, Map<String, MarkdownElementBuilder> builders: const {}, EdgeInsets padding: const EdgeInsets.all(16.0), ScrollController controller, ScrollPhysics physics, bool shrinkWrap: false})
Creates a scrolling widget that parses and displays Markdown.


blockSyntaxes List<BlockSyntax>
Collection of custom block syntax types to be used parsing the Markdown data.
final, inherited
builders Map<String, MarkdownElementBuilder>
Render certain tags, usually used with extensionSet [...]
final, inherited
checkboxBuilder MarkdownCheckboxBuilder
Call when build a checkbox widget.
final, inherited
controller ScrollController
An object that can be used to control the position to which this scroll view is scrolled. [...]
data String
The Markdown to display.
final, inherited
extensionSet ExtensionSet
Markdown syntax extension set [...]
final, inherited
fitContent bool
Whether to allow the widget to fit the child content.
final, inherited
hashCode int
The hash code for this object. [...]
@nonVirtual, read-only, inherited
imageBuilder MarkdownImageBuilder
Call when build an image widget.
final, inherited
imageDirectory String
The base directory holding images referenced by Img tags with local or network file paths.
final, inherited
inlineSyntaxes List<InlineSyntax>
Collection of custom inline syntax types to be used parsing the Markdown data.
final, inherited
key Key
Controls how one widget replaces another widget in the tree. [...]
final, inherited
Called when the user taps a link.
final, inherited
padding EdgeInsets
The amount of space by which to inset the children.
physics ScrollPhysics
How the scroll view should respond to user input. [...]
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
selectable bool
If true, the text is selectable. [...]
final, inherited
shrinkWrap bool
Whether the extent of the scroll view in the scroll direction should be determined by the contents being viewed. [...]
styleSheet MarkdownStyleSheet
The styles to use when displaying the Markdown. [...]
final, inherited
styleSheetTheme MarkdownStyleSheetBaseTheme
Setting to specify base theme for MarkdownStyleSheet [...]
final, inherited
syntaxHighlighter SyntaxHighlighter
The syntax highlighter used to color text in pre elements. [...]
final, inherited


build(BuildContext context, List<Widget> children) Widget
Subclasses should override this function to display the given children, which are the parsed representation of data.
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
createState() → _MarkdownWidgetState
Creates the mutable state for this widget at a given location in the tree. [...]
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toDiagnosticsNode({String name, DiagnosticsTreeStyle style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep. [...]
toString({DiagnosticLevel minLevel:}) String
Returns a string representation of this object.
toStringDeep({String prefixLineOne: '', String prefixOtherLines, DiagnosticLevel minLevel: DiagnosticLevel.debug}) String
Returns a string representation of this node and its descendants. [...]
toStringShallow({String joiner: ', ', DiagnosticLevel minLevel: DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object. [...]
toStringShort() String
A short, textual description of this widget.


operator ==(Object other) bool
The equality operator. [...]
@nonVirtual, inherited