removeEmptyRows function

List<List> removeEmptyRows(
  1. List<List> rows
)

Removes rows with empty/null values.

Implementation

List<List<dynamic>> removeEmptyRows(List<List<dynamic>> rows) {
  return rows.where((row) => !row.any((element) => element == null || element.toString().trim().isEmpty)).toList();
}