printLines function

String printLines(
  1. List<String> lines,
  2. int start,
  3. int end,
  4. int maxNumLength,
  5. Settings settings
)

Implementation

String printLines(List<String> lines, int start, int end, int maxNumLength,
    Settings settings) {
  return lines
      .sublist(start, end)
      .asMap()
      .map((i, line) =>
          MapEntry(i, printLine(line, start + i + 1, maxNumLength, settings)))
      .values
      .join('\n');
}