TableCellElement _cell()

in lib/src/hierarchy_view.dart [294:311]


TableCellElement _cell(dynamic text,
    {String align: 'left', String colspan: '1', bool pre: false}) {
  TableCellElement element = new TableCellElement()
    ..style.textAlign = align
    ..attributes['colspan'] = colspan;

  if (pre) {
    PreElement pre = new PreElement();
    pre.text = text.toString();
    element.append(pre);
  } else if (text is Node) {
    element.children.add(text);
  } else {
    element.text = text.toString();
  }

  return element;
}