mapColumn function
EditableColumn<EditableRow>
mapColumn(
- String key,
- String label, {
- double width = 160,
- EditableColumnType type = EditableColumnType.text,
- bool readOnly = false,
Implementation
EditableColumn<EditableRow> mapColumn(
String key,
String label, {
double width = 160,
EditableColumnType type = EditableColumnType.text,
bool readOnly = false,
}) =>
EditableColumn<EditableRow>(
label: label,
width: width,
type: type,
value: (r) => r[key] ?? '',
setValue: readOnly ? null : (r, v) => {...r, key: v},
);