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();
  switch (filler) {
    case Separator.line:
      sb.write('+');
      for (var i = 0; i < widths.length; i++) {
        sb.write('-' * (widths[i] + 2));
        sb.write('+');
      }
      break;

    case Separator.wave:
      sb.write('~' * Row.totalWidth(widths));
      break;
  }
  return sb.toString();
}