CarpenterEditableTable<T> class final

Local-data table for editable business grids.

The regular Carpenter table is optimized for collection adapters, sorting, paging and server-backed snapshots. This widget is intentionally small and mutation-friendly. Cell builders may contain inputs, checkboxes, date fields and row actions. Header actions cover add/import operations and footerCells provides aligned totals or other per-column summaries.

Inheritance

Constructors

CarpenterEditableTable({Key? key, required List<T> items, required List<CarpenterTableColumn<T>> columns, List<Widget> headerActions = const [], Map<String, CarpenterTableFooterCellBuilder<T>> footerCells = const {}, ValueChanged<T>? onRowSelected, ValueChanged<T>? onRowActivated, bool selected(T item)?, LengthUnit minimumWidth = const Rem(48), String emptyMessage = 'No rows', String semanticLabel = 'Editable table'})
Presents caller-owned local rows and editable cell builders. It does not own draft values, persist changes, sort, or page data. Keep editor controllers outside cell builders and dispose them when rows are removed.
const

Properties

columns List<CarpenterTableColumn<T>>
Ordered column descriptors supplying headers, cell builders, horizontal alignment, and width policy. Use stable unique IDs to address footer cells.
final
emptyMessage String
Text displayed instead of body rows when items is empty. Headers, header actions, and configured footer cells remain available.
final
footerCells Map<String, CarpenterTableFooterCellBuilder<T>>
Footer builders keyed by column ID. Each receives the full items list. Columns without a matching builder get an empty footer cell; an empty map omits the entire footer.
final
hashCode int
The hash code for this object.
no setterinherited
headerActions List<Widget>
Actions placed above the header in an end-aligned wrapping row. The table does not implement add, import, or save operations itself.
final
items List<T>
Rows displayed in list order and passed together to footer builders. Mutate application state and rebuild to reflect edits, insertion, or removal.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
minimumWidth LengthUnit
Minimum table content width, defaulting to 48 rem. A narrower viewport gets horizontal scrolling rather than compressed columns.
final
onRowActivated ValueChanged<T>?
Optional notification for a row double tap. This is separate from row selection and does not automatically open an editor.
final
onRowSelected ValueChanged<T>?
Optional notification for a row tap. Selection is not stored; rebuild with an updated selected predicate to change highlighting.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selected bool Function(T item)?
Caller-owned predicate deciding whether each row is highlighted. Null means no rows are highlighted.
final
semanticLabel String
Accessible name for the table container, defaulting to Editable table.
final

Methods

build(BuildContext context) Widget
Composes headers, editable rows, and aligned footer cells using CarpenterTheme. Width constraints determine whether a horizontal scroll view is needed; vertical scrolling belongs to the parent.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

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