render method

  1. @override
String render(
  1. List<int> widths,
  2. List<AlignmentDirection> alignments
)
override

Implementation

@override
String render(List<int> widths, List<AlignmentDirection> alignments) {
  final sb = StringBuffer();
  sb.write('|');
  for (var i = 0; i < widths.length; i++) {
    sb.write(' ');
    final text = columns[i] is Text
        ? columns[i]
        : Text(value: columns[i], direction: alignments[i]);
    sb.write(text.render(widths[i]));
    sb.write(' |');
  }
  return sb.toString();
}