totalWidth static method

int totalWidth(
  1. List<int> widths
)

Compute the total width of the row given widths of individual columns.

Note: there is a border on the left and right of each column plus whitespace around it.

Implementation

static int totalWidth(List<int> widths) =>
    widths.fold<int>(0, (sum, width) => sum + width + 3) + 1;