toPlainText method

String toPlainText()

Implementation

String toPlainText() {
  final buffer = StringBuffer();
  visitChildren((
    InlineSpan span,
    TextStyle? style,
    AnnotationBuilder? annotation,
  ) {
    if (span is TextSpan) {
      buffer.write(span.text);
    }
    return true;
  }, null, null);
  return buffer.toString();
}