TableDataSource constructor

TableDataSource({
  1. required List<Map<String, dynamic>> tableData,
})

Implementation

TableDataSource({required List<Map<String, dynamic>> tableData}) {
  _tableData = tableData
      .map((data) => DataGridRow(
    cells: data.entries
        .map((e) => DataGridCell<dynamic>(
      columnName: e.key,
      value: e.value,
    ))
        .toList(),
  ))
      .toList();
}