Document class
Represents a structured document consisting of paragraphs.
Constructors
-
Document.new({required Iterable<
Paragraph> paragraphs})
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
-
paragraphs
→ List<
Paragraph> -
List of paragraphs contained within the document.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clean(
) → void - Clears all paragraphs from the document.
-
ensureCorrectFormat(
) → Document - Ensures correct formatting of paragraphs in the document.
-
exist(
Paragraph pr) → bool - Returns a bool value that indicates if the Paragraph exists into the Document.
-
getLast(
{Paragraph orElse()?}) → Paragraph? -
Returns the last
paragraph
into the document. -
getLastSafe(
) → Paragraph -
Returns the last
paragraph
into the document and validate before to avoid exceptions. -
getParagraph(
Paragraph paragraph) → Paragraph? -
getParagraphAfter(
Paragraph paragraph) → Paragraph? -
getParagraphBefore(
Paragraph paragraph) → Paragraph? -
insert(
Paragraph paragraph) → void -
Inserts a new
paragraph
into the document. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toPrettyString(
) → String - Returns a version of the string that can be readed more easily.
-
toString(
) → String -
Returns a string representation of the document.
override
-
updateLast(
Paragraph paragraph) → void -
Update a last
paragraph
into the document. -
updateLastSafe(
Paragraph paragraph) → void -
Update a last
paragraph
into the document validating to make more safe the operation. -
updateParagraph(
Paragraph paragraph) → void -
Update a
paragraph
into the document validating to make more safe the operation. -
updateParagraphSafe(
Paragraph paragraph) → void
Operators
-
operator ==(
covariant Document other) → bool -
The equality operator.
override