EditableColumn class

The schema for a single column. This is the customisation surface: a host builds a List<EditableColumn> to define its table.

Implementers
Annotations

Constructors

EditableColumn({required String key, required String label, double width = 160, CellAlign? align, bool mono = false, bool required = false, EditableColumnType type = EditableColumnType.text, List<String> options = const [], bool includeInTotal = false, String format(String raw)?, String? validate(String value)?, EditableCellValidator? cellValidator, EditableCellBuilder? cellBuilder})
const

Properties

align CellAlign
Content alignment (number columns default to CellAlign.end).
final
blankValue String
The blank value a new row should hold for this column (first option for a select, empty otherwise).
no setter
cellBuilder EditableCellBuilder?
Optional custom renderer for the cell's read-only content. When set, the default text is replaced by whatever this returns (a chip, badge, bar…). Editing still uses the standard editor / select menu.
final
cellValidator EditableCellValidator?
Row-aware validator — like validate but also receives the whole row, so it can flag a cell based on its siblings (e.g. "end ≥ start", or "total must equal qty × price"). Runs after validate.
final
editableInline bool
Whether the cell opens the standard inline text editor (text / number / date / time / combo). Picker-only kinds (select, color) and the non-editable kinds (readonly, computed) return false.
no setter
format String Function(String raw)?
Optional custom formatter applied on commit (overrides the built-in number grouping). Receives the raw typed string, returns the stored one.
final
hashCode int
The hash code for this object.
no setterinherited
includeInTotal bool
Include this (numeric) column in the totals footer sum.
final
isReadOnly bool
Whether the cell can never be edited (readonly / computed).
no setter
key String
Stable key into each EditableRow.
final
label String
Header label.
final
mono bool
Render the cell value in the monospace family (codes, amounts).
final
options List<String>
Choices for EditableColumnType.select.
final
required bool
Required — empty cells flag red and feed the validation badge.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type EditableColumnType
Editing / rendering behaviour.
final
validate String? Function(String value)?
Optional validator — return an error message, or null when valid. Runs in addition to required. Value-only; for cross-column rules use cellValidator.
final
width double
Fixed pixel width of the column.
final

Methods

displayValue(EditableRow row) String
The string this column shows for row. Stored value for most kinds; ComputedColumn overrides this to derive it from the whole row.
errorFor(String value, [EditableRow? row]) String?
Validation error for value under this column, or null when valid. Pass row to also run the row-aware cellValidator.
normalize(String raw) String
Normalises a freshly-typed value on commit. Base honours an explicit format callback, else groups numbers; subclasses override to clamp / reformat dates, times, numerics.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited