WidgetVisitor class
use WidgetVisitor that can transform MarkdownNode to SpanNodes and you can use SpanNode with Text.rich or RichText to get widget
Constructors
-
WidgetVisitor({MarkdownConfig? config, List<
SpanNodeGeneratorWithTag> generators = const [], SpanNodeAcceptCallback? onNodeAccepted, TextNodeGenerator? textGenerator, RichTextBuilder? richTextBuilder, RegExp? splitRegExp})
Properties
- config ↔ MarkdownConfig
-
MarkdownConfig is used to define the UI display
getter/setter pair
-
generators
→ List<
SpanNodeGeneratorWithTag> -
add your custom SpanNodeGeneratorWithTag to generators
that you can customize the conversion of Nodes
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- onNodeAccepted → SpanNodeAcceptCallback?
-
this function will be triggered when a SpanNode is accepted
final
- richTextBuilder → RichTextBuilder?
-
use richTextBuilder to custom your own Text.rich
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- splitRegExp → RegExp?
-
use splitRegExp to split markdown data
final
- textGenerator → TextNodeGenerator?
-
use textGenerator to custom your own TextNode
final
Methods
-
getNodeByElement(
Element element, MarkdownConfig config) → SpanNode -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
visit(
List< Node> nodes) → List<SpanNode> - visit will return a SpanNode list
-
visitElementAfter(
Element element) → void - Called when an Element has been reached, after its children have been visited.
-
visitElementBefore(
Element element) → bool - Called when an Element has been reached, before its children have been visited.
-
visitText(
Text text) → void - Called when a Text node has been reached.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- defaultSplitRegExp ↔ RegExp
-
getter/setter pair