Document class

Represents a structured document consisting of paragraphs.

Constructors

Document({required List<Paragraph> paragraphs, SetupInfo? setupInfo})

Properties

hashCode int
The hash code for this object.
no setterinherited
paragraphs List<Paragraph>
List of paragraphs contained within the document.
final
props List<Object?>
Returns a list of properties used for equality comparison.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
setupInfo SetupInfo?
Optional setup information for the document.
getter/setter pair
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

clean() → void
Clears all paragraphs from the document.
ensureCorrectFormat() Document
Ensures correct formatting of paragraphs in the document.
getLast() Paragraph?
Returns the last paragraph into the document.
getLastSafe() Paragraph
Returns the last paragraph into the document and validate before to avoid exceptions.
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
removeAllEmptyParagraphs() Document
Removes all empty paragraphs from the document.
toString() String
Returns a string representation of the document.
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.

Operators

operator ==(Object other) bool
The equality operator.
inherited