visitInlineSpanChildren method

bool visitInlineSpanChildren(
  1. InlineSpanVisitor visitor
)

Walks InlineSpan children and each InlineSpans descendants in pre-order and calls visitor for each span that has content.

When visitor returns true, the walk continues. When visitor returns false, the walk ends.

Implementation

bool visitInlineSpanChildren(InlineSpanVisitor visitor) {
  var textIndex = 0;
  for (final el in _textAndWidgets) {
    if (el is WrappableText) {
      final wtr = _cache[textIndex++];
      for (final textRenderer in wtr.renderers) {
        if (!textRenderer.text.visitChildren(visitor)) return false;
      }
    }
  }
  return true;
}