DocxTableOfContents class

Represents a Table of Contents (TOC) in the document.

A TOC in Word is typically an SDT (Structured Document Tag) containing a Field Code (TOC) and cached result paragraphs.

Inheritance

Constructors

DocxTableOfContents({String instruction = 'TOC \\o "1-3" \\h \\z \\u', bool updateOnOpen = true, List<DocxBlock> cachedContent = const [], String? id})
const

Properties

cachedContent List<DocxBlock>
Cached content (paragraphs) to display before update.
final
hashCode int
The hash code for this object.
no setterinherited
id String?
Unique identifier for this node (for debugging/tracking).
finalinherited
instruction String
The TOC field instruction.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
updateOnOpen bool
Whether to mark the TOC as dirty (update on open).
final

Methods

accept(DocxVisitor visitor) → void
Accepts a visitor for traversing the AST.
override
buildXml(XmlBuilder builder) → void
Converts this node to its XML representation.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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