TreeEnumerator class

Defines the characters used to draw tree branches.

// Use a preset
Tree().enumerator(TreeEnumerator.rounded)

// Or create custom
Tree().enumerator(TreeEnumerator(
  pipe: '│',
  tee: '├',
  elbow: '╰',
  dash: '──',
))

Constructors

TreeEnumerator({required String pipe, required String tee, required String elbow, required String dash, String indent = ' '})
Creates a tree enumerator with the specified characters.
const

Properties

dash String
Horizontal dash connecting to items.
final
elbow String
Elbow/corner character for last items.
final
hashCode int
The hash code for this object.
no setteroverride
indent String
Indentation string when no pipe is needed.
final
pipe String
Vertical pipe character for continuing branches.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tee String
T-junction character for non-last items.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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

Constants

arrow → const TreeEnumerator
Arrow-style list (→ for all items).
ascii → const TreeEnumerator
ASCII-only characters for maximum compatibility (+-- `--).
bullet → const TreeEnumerator
Bullet-style list (• for all items).
dash_ → const TreeEnumerator
Dash-style list (- for all items).
doubleLine → const TreeEnumerator
Double-line tree characters.
heavy → const TreeEnumerator
Heavy/thick tree characters.
normal → const TreeEnumerator
Normal/standard tree characters (├── └──).
rounded → const TreeEnumerator
Rounded tree characters with curved elbow (├── ╰──).