flutter/ui/markdown/markdown_widget library

Classes

BlockConfig
the basic block config interface
BlockquoteConfig
config class for Block quotes, tag: blockquote
BlockquoteNode
Tag: MarkdownTag.blockquote
BrNode
Tag: MarkdownTag.br
CheckBoxConfig
config class for checkbox, tag: input
CodeBlockNode
Tag: MarkdownTag.pre
CodeConfig
config class for code, tag: code
CodeNode
Tag: MarkdownTag.code the code textSpan
ConcreteElementNode
the default concrete node for ElementNode
ContainerConfig
the container block config interface
DelNode
Tag: MarkdownTag.del
ElementNode
this node will accept other MarkdownSpanNodeGeneralFrameworkWidget as children
EmNode
Tag: MarkdownTag.em
H1Config
config class for h1
H2Config
config class for h2
H3Config
config class for h3
H4Config
config class for h4
H5Config
config class for h5
H6Config
config class for h6
HeadingConfig
config class for heading
HeadingDivider
only support h1 and h2
HeadingNode
Tag: MarkdownTag.h1 ~ MarkdownTag.h6
HorizontalRulesConfig
config class for HorizontalRulesNode
HorizontalRulesNode
Tag: MarkdownTag.hr
ImageNode
Tag: MarkdownTag.img
ImageViewer
show image with InteractiveViewer
ImgConfig
config class for image, tag: img
InlineConfig
the inline widget config interface
InputNode
Tag: MarkdownTag.input
LeafConfig
the leaf block config interface
LinkConfig
config class for link, tag: a
LinkNode
Tag: MarkdownTag.a
ListConfig
config class for list, tag: li
ListNode
Tag MarkdownTag.li
MarkdownBlockGeneralFrameworkWidget
use MarkdownBlockGeneralFrameworkWidget to build markdown by Column it does not support scrolling by default, but it will adapt to the width automatically.
MarkdownConfigGeneralFramework
use MarkdownConfigGeneralFramework to set various configurations for MarkdownGeneralFrameworkWidget
MarkdownFlutterContentGeneralFramework
UncompleteDocumentation
MarkdownFlutterGeneralFrameworkWidget
UncompleteDocumentation
MarkdownFlutterPageGeneralFramework<T extends MarkdownFlutterPageStateGeneralFramework>
UncompleteDocumentation
MarkdownFlutterPageStateGeneralFramework
UncompleteDocumentation
MarkdownGeneralFrameworkGenerator
use MarkdownGeneralFrameworkGenerator to transform markdown data to Widget list, so you can render it by any type of ListView
MarkdownGeneralFrameworkWidget
UncompleteDocumentation
MarkdownGeneralFrameworkWidgetState
UncompleteDocumentation
MarkdownProxyRichTextGeneralFrameworkWidget
use MarkdownProxyRichTextGeneralFrameworkWidget to give textScaleFactor a default value
MarkdownSpanNodeGeneralFrameworkWidget
the basic node
MarkdownSpanNodeGeneralFrameworkWidgetGeneratorWithTag
use MarkdownSpanNodeGeneralFrameworkWidgetGeneratorWithTag that you can custom your own MarkdownSpanNodeGeneralFrameworkWidgetGenerator with tag
MarkdownWidgetConfig
UncompleteDocumentation
MCheckBox
the check box widget
ParagraphMarkdownConfig
config class for paragraphs, tag: p
ParagraphNode
Tag: MarkdownTag.p
PreConfig
config class for pre
StrongNode
Tag: MarkdownTag.strong
TableConfig
UncompleteDocumentation
TableNode
UncompleteDocumentation
TBodyNode
UncompleteDocumentation
TdNode
UncompleteDocumentation
TextNode
text node only displays text
THeadNode
UncompleteDocumentation
ThNode
UncompleteDocumentation
Toc
config for toc
TocControllerGeneralFrameworkWidget
TocControllerGeneralFrameworkWidget combines TocWidget and MarkdownGeneralFrameworkWidget, you can use it to control the jump between the two, and each TocWidget corresponds to a MarkdownGeneralFrameworkWidget.
TocItemBuilderData
pass TocItemBuilderData to help build your own TocItemBuilder
TocWidget
UncompleteDocumentation
TrNode
UncompleteDocumentation
UlOrOLNode
Tag MarkdownTag.olMarkdownTag.ul
WidgetVisitor
use WidgetVisitor that can transform MarkdownNode to MarkdownSpanNodeGeneralFrameworkWidgets and you can use MarkdownSpanNodeGeneralFrameworkWidget with Text.rich or RichText to get widget

Enums

MarkdownTag
/ the tags of markdown, see https://spec.commonmark.org/0.30/

Properties

headingTag2Level Map<String, int>
every heading tag has a special level
final

Functions

convertHiNodes(List<Node> nodes, Map<String, TextStyle> theme, TextStyle? style, TextStyle? styleNotMatched) List<TextSpan>
UncompleteDocumentation
getDefaultMarker(bool isOrdered, int depth, Color? color, int index, double paddingTop, MarkdownConfigGeneralFramework config) Widget
get default marker for list
highLightSpans(String input, {String? language, bool autoDetectionLanguage = false, Map<String, TextStyle> theme = const {}, TextStyle? textStyle, TextStyle? styleNotMatched, int tabSize = 8}) List<InlineSpan>
transform code to highlight code
wrapByAutoScroll(int index, Widget child, AutoScrollController controller) Widget
wrap widget by AutoScrollTag that can use AutoScrollController to scrollToIndex

Typedefs

CheckBoxBuilder = Widget Function(bool checked)
define a function to return a checkbox widget
CodeBuilder = Widget Function(String code, String language)
UncompleteDocumentation
CodeWrapper = Widget Function(Widget child, String code, String language)
UncompleteDocumentation
ErrorImgBuilder = Widget Function(String url, String alt, Object error)
UncompleteDocumentation
ImgBuilder = Widget Function(String url, Map<String, String> attributes)
UncompleteDocumentation
ListMarker = Widget? Function(bool isOrdered, int depth, int index)
the function to get marker widget
MarkdownFlutterAppBarActionsGeneralFrameworkFunction<T extends MarkdownFlutterPageStateGeneralFramework> = List<Widget> Function(BuildContext context, T markdownFlutterPageStateGeneralFramework)
UncompleteDocumentation
MarkdownFlutterContentGeneralFrameworkFunction<T extends MarkdownFlutterPageStateGeneralFramework> = FutureOr<MarkdownFlutterContentGeneralFramework> Function(BuildContext context, T markdownFlutterPageStateGeneralFramework)
UncompleteDocumentation
MarkdownFlutterOnUrlPressedGeneralFrameworkFunction<T extends MarkdownFlutterPageStateGeneralFramework> = void Function(BuildContext context, String url, T markdownFlutterPageStateGeneralFramework)
UncompleteDocumentation
MarkdownFlutterPopupMenuItemsGeneralFrameworkFunction<T extends MarkdownFlutterPageStateGeneralFramework> = List<PopupMenuEntry> Function(BuildContext context, T markdownFlutterPageStateGeneralFramework, TextStyle textStyle)
UncompleteDocumentation
MarkdownSpanNodeGeneralFrameworkWidgetAcceptCallback = void Function(MarkdownSpanNodeGeneralFrameworkWidget node, int nodeIndex)
when a SpanNope is visited, this callback will be triggered
MarkdownSpanNodeGeneralFrameworkWidgetBuilder = TextSpan Function(MarkdownSpanNodeGeneralFrameworkWidget spanNode)
UncompleteDocumentation
MarkdownSpanNodeGeneralFrameworkWidgetGenerator = MarkdownSpanNodeGeneralFrameworkWidget Function(Element e, MarkdownConfigGeneralFramework config, WidgetVisitor visitor)
use MarkdownSpanNodeGeneralFrameworkWidgetGenerator will return a MarkdownSpanNodeGeneralFrameworkWidget
RichTextBuilder = Widget Function(InlineSpan span)
UncompleteDocumentation
TextNodeGenerator = MarkdownSpanNodeGeneralFrameworkWidget? Function(Node node, MarkdownConfigGeneralFramework config, WidgetVisitor visitor)
use TextNodeGenerator to custom your own TextNode
TocItemBuilder = Widget? Function(TocItemBuilderData data)
use TocItemBuilder to return a custom widget
ValueCallback<T> = void Function(T value)
UncompleteDocumentation
WidgetWrapper = Widget Function(Widget child)
wrap child by another widget