Surrounded class

Renders a prefix and/or suffix around an optional child.

If child is null, renders nothing (empty). If child is non-null, renders prefix, child, suffix.

Inheritance
Annotations
  • @experimental

Constructors

Surrounded({LogSpan? prefix, LogSpan? child, LogSpan? suffix})
Creates a surrounded span with optional prefix, child, and suffix.

Properties

allAncestors Iterable<LogSpan>
Returns all ancestors from parent to root.
no setterinherited
allChildren Iterable<LogSpan>
All direct children of this span.
no setterinherited
allDescendants Iterable<LogSpan>
Returns all descendants (including self) in pre-order.
no setterinherited
child LogSpan?
The main content span (if null, nothing is rendered).
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
parent LogSpan?
Parent span in the tree, or null if this is the root.
no setterinherited
prefix LogSpan?
The span rendered before the child.
getter/setter pair
root LogSpan
Returns the root span of the tree.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
suffix LogSpan?
The span rendered after the child.
getter/setter pair

Methods

build() LogSpan
Builds this span into another span, or returns itself if already terminal.
inherited
findAll<T extends LogSpan>() Iterable<T>
Finds all descendants (including self) of type T.
inherited
findFirst<T extends LogSpan>() → T?
Finds the first descendant (including self) of type T.
inherited
getSlot(String slot) LogSpan?
Gets the span in the named slot.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove() bool
Removes this span from its parent.
inherited
render(ConsoleMessageBuffer buffer) → void
Renders this span to the buffer.
override
replaceWith(LogSpan newSpan) bool
Replaces this span in its parent with newSpan.
inherited
setSlot(String slot, LogSpan? child) → void
Sets the span in the named slot.
inherited
toString() String
A string representation of this object.
override
wrap(LogSpan wrapper(LogSpan child)) → void
Wraps this span with a wrapper span.
inherited

Operators

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

Constants

childSlot → const String
Slot name for the child span.
prefixSlot → const String
Slot name for the prefix span.
suffixSlot → const String
Slot name for the suffix span.