findTextInParagraph static method

AttributedText findTextInParagraph(
  1. String nodeId, [
  2. Finder? superDocumentFinder
])

Returns the AttributedText within the ParagraphNode associated with the given nodeId.

There must be a ParagraphNode with the given nodeId, displayed in a SuperReader.

By default, this method expects a single SuperReader in the widget tree and finds it byType. To specify one SuperReader among many, pass a superDocumentFinder.

Implementation

static AttributedText findTextInParagraph(String nodeId, [Finder? superDocumentFinder]) {
  final documentLayout = _findDocumentLayout(superDocumentFinder);
  return (documentLayout.getComponentByNodeId(nodeId) as TextComponentState).widget.text;
}