TocEntry class

Represents a heading entry for the table of contents.

Constructors

TocEntry({required String id, required String text, required int depth, List<TocEntry> children = const []})
const
TocEntry.fromJson(Map<String, dynamic> json)
Create a TocEntry from a map (for JSON deserialization).
factory

Properties

children List<TocEntry>
Child entries for nested headings.
final
depth int
The depth level (1-6 corresponding to h1-h6).
final
hashCode int
The hash code for this object.
no setterinherited
id String
The unique ID for the heading (used for anchor links).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String
The display text of the heading.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Convert to JSON map.
toString() String
A string representation of this object.
inherited

Operators

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