toStringWalkUp method Null safety

String toStringWalkUp(
  1. {int level = 0}
)

more detailed dump of the guts, following parent links and dumping

Implementation

String toStringWalkUp({int level = 0}) {
  String thisOne =
      "[$level] Chalk(open:'${_open.replaceAll('\u001B', 'ESC')}',close:'${_close.replaceAll('\u001B', 'ESC')}')";
  if (level == 0) {
    thisOne +=
        "[$level] ALL Chalk(open:'${_openAll.replaceAll('\u001B', 'ESC')}',close:'${_closeAll.replaceAll('\u001B', 'ESC')}')";
  }
  String parentStr = '';
  if (_parent != null) {
    level++;
    parentStr = _parent!.toStringWalkUp(level: level);
  }
  return parentStr + thisOne;
}