exist method

bool exist(
  1. Paragraph pr
)

Returns a bool value that indicates if the Paragraph exists into the Document.

Implementation

bool exist(Paragraph pr) {
  if (paragraphs.isEmpty) return false;
  return paragraphs.contains(pr) ||
      paragraphs.firstWhereOrNull((e) => e.id == pr.id) != null;
}