text property

String get text

Returns the content of this node as text.

Implementation

String get text {
  if (isEmptyContent) return '';
  if (_content!.length == 1) {
    return _content![0].text;
  } else {
    return _content!.map((e) => e.text).join('');
  }
}