build method
Builds this span into another span, or returns itself if already terminal.
Override this for composable spans that build to other spans.
Default implementation returns this.
Example:
class Timestamp extends LeafSpan {
final DateTime date;
Timestamp(this.date);
@override
LogSpan build() => PlainText('${date.hour}:${date.minute}');
}
Implementation
@override
LogSpan build() => PlainText(name);