lastChildText property

String get lastChildText

Implementation

String get lastChildText {
  if (nodes.isEmpty) {
    return '[non-text tag]';
  }
  if (nodes.last is dom.Text) {
    return nodes.last.text ?? '';
  } else {
    return nodes.last.lastChildText;
  }
}