visitText method

  1. @override
void visitText(
  1. Text text
)

Called when a Text node has been reached.

Implementation

@override
void visitText(m.Text text) {
  final last = _spansStack.last;
  if (last is ElementNode) {
    final textNode = textGenerator?.call(text, config, this) ??
        TextNode(text: text.text, style: config.p.textStyle);
    last.accept(textNode);
    onNodeAccepted?.call(textNode, _currentSpanIndex);
  }
}