OrgSection class

An Org section. May have nested sections, like

* TODO [#A] COMMENT Title :tag1:tag2:
content
** Sub section
more content
Inheritance

Constructors

OrgSection(OrgHeadline headline, OrgContent? content, [Iterable<OrgSection>? sections, String? id])

Properties

attachDir String?
Get the directory in which attachments are expected to be found for this section. The behavior follows Org Mode defaults: org-attach-use-inheritance is selective and org-use-property-inheritance is nil, meaning that the relevant properties are not inherited from parent sections.
no setterinherited
children List<OrgNode>
Leading content, if present, followed by sections
no setteroverride
content OrgContent?
Leading content
finalinherited
customIds List<String>
Get the CUSTOM_ID properties from this section's PROPERTIES drawer, if any.
no setterinherited
dirs List<String>
Get the DIR properties from this section's PROPERTIES drawer, if any.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
headline OrgHeadline
final
id String
A unique ID for this node. Use this to identify nodes across edits via OrgTree.edit, because OrgParentNodes can be recreated and thus will not be equal via identical.
finalinherited
ids List<String>
Get the ID properties from this section's PROPERTIES drawer, if any.
no setterinherited
isEmpty bool
A section may be empty if it has no content or sub-sections
no setter
level int
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sections List<OrgSection>
Sections contained within this tree. These are also iterated by children.
finalinherited

Methods

contains(Pattern pattern, {bool includeChildren = true}) bool
Return true if this node or any of its children recursively match the supplied pattern
override
copyWith({OrgHeadline? headline, OrgContent? content, Iterable<OrgSection>? sections, String? id}) OrgSection
edit() OrgZipper
Obtain a zipper starting at the root of this tree. The zipper can be used to edit the tree; call ZipperLocation.commit to obtain a new tree with the edits applied.
inherited
editNode(OrgNode node) OrgZipper?
Obtain a zipper for the specified node, which is presumed to be in this tree. Returns null if the node is not found. The zipper can be used to edit the tree; call ZipperLocation.commit to obtain a new tree with the edits applied.
inherited
find<T extends OrgNode>(bool predicate(T), [OrgPath path = const []]) → ({T node, OrgPath path})?
Find the first node in the AST that satisfies predicate. Specify a type T to only visit nodes of that type. Returns a tuple of the node and its path from the root of the tree, or null if no node is found.
inherited
findContainingTree<T extends OrgNode>(T node) OrgTree?
Find the immediate parent OrgSection or OrgDocument of the specified node.
inherited
fromChildren(List<OrgNode> children) OrgSection
override
getProperties(String key) List<String>
Get the properties corresponding to key from this section's PROPERTIES drawer, if any.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMarkup() String
inherited
toString() String
A string representation of this object.
override
visit<T extends OrgNode>(bool visitor(T)) bool
Walk AST with visitor. Specify a type T to only visit nodes of that type. The visitor function must return true to continue iterating, or false to stop.
inherited
visitSections(bool visitor(OrgSection)) bool
Walk only section nodes of the AST with visitor. More efficient than calling visit. The visitor function must return true to continue iterating, or false to stop.
inherited

Operators

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