getWidthOfCanvas function

double getWidthOfCanvas(
  1. Matrix matrix,
  2. double defaultCellWidth,
  3. EdgeInsets cellPadding
)

Implementation

double getWidthOfCanvas(
    Matrix matrix, double defaultCellWidth, EdgeInsets cellPadding) {
  double width = 0.0;
  for (int x = 0; x < matrix.width(); x++) {
    width += (getWidestWidthInAColumn(matrix, defaultCellWidth, x) +
        cellPadding.left +
        cellPadding.right);
  }
  return width;
}