columnBlueprint function

dynamic columnBlueprint(
  1. dynamic columnCount,
  2. dynamic columns
)

Generates empty columns using the specified columnCount, if no column count is provided, it uses the columns.length value

Implementation

columnBlueprint(columnCount, columns) {
  var data = List.generate(
      columnCount, (index) => {'title': '', 'index': index, 'key': index});
  columns = [...data];
  return columns;
}