findLastParagraph function

Paragraph? findLastParagraph(
  1. FNode node
)

Returns the last Paragraph child of node, or null if none.

Implementation

Paragraph? findLastParagraph(FNode node) {
  final children = childrenOf(node);
  for (int i = children.length - 1; i >= 0; i--) {
    if (children[i] is Paragraph) return children[i] as Paragraph;
  }
  return null;
}