DynamicTableSource constructor
DynamicTableSource({
- bool showActions = false,
- bool showDeleteAction = true,
- required List<
DynamicTableDataRow> data, - required List<
DynamicTableDataColumn> columns, - required String actionColumnTitle,
- bool onRowEdit()?,
- bool onRowDelete()?,
- List? onRowSave()?,
Implementation
DynamicTableSource({
this.showActions = false,
this.showDeleteAction = true,
required this.data,
required this.columns,
required this.actionColumnTitle,
this.onRowEdit,
this.onRowDelete,
this.onRowSave,
}) {
_selectedCount = data.where((element) => element.selected).length;
for (int i = 0; i < columns.length; i++) {
if (columns[i].dynamicTableInputType.dependentOn != null) {
int dependent = (columns[i].dynamicTableInputType
as DynamicTableDependentDropDownInput)
.dependentOn!;
if (dependentOn[dependent] == null) {
dependentOn[dependent] = [];
}
dependentOn[dependent]!.add(i);
}
}
}