NumericColumn class

A numeric column with optional min / max clamp and fixed decimals. Right-aligned & monospace by default; summable via includeInTotal.

Inheritance

Constructors

NumericColumn({required String key, required String label, double width = 130, CellAlign? align, bool mono = true, bool required = false, bool includeInTotal = false, String? validate(String value)?, EditableCellValidator? cellValidator, EditableCellBuilder? cellBuilder, num? min, num? max, int decimals = 2})
const

Properties

align CellAlign
Content alignment (number columns default to CellAlign.end).
finalinherited
blankValue String
The blank value a new row should hold for this column (first option for a select, empty otherwise).
no setterinherited
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.
finalinherited
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.
finalinherited
decimals int
Fractional digits kept on commit. 0 for integers; -1 to leave the typed precision untouched (still grouped).
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 setterinherited
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.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
includeInTotal bool
Include this (numeric) column in the totals footer sum.
finalinherited
isReadOnly bool
Whether the cell can never be edited (readonly / computed).
no setterinherited
key String
Stable key into each EditableRow.
finalinherited
label String
Header label.
finalinherited
max num?
final
min num?
final
mono bool
Render the cell value in the monospace family (codes, amounts).
finalinherited
options List<String>
Choices for EditableColumnType.select.
finalinherited
required bool
Required — empty cells flag red and feed the validation badge.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type EditableColumnType
Editing / rendering behaviour.
finalinherited
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.
finalinherited
width double
Fixed pixel width of the column.
finalinherited

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.
inherited
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.
inherited
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.
override
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