DataTablePlus class

In-place replacement of standard DataTable widget, mimics it API. Has the header row always fixed and core of the table (with data rows) scrollable and stretching to max width/height of it's container. By using DataColumnPlus instead of DataColumn it is possible to control relative column sizes (setting them to S, M and L). DataRowPlus provides row-level tap event handlers.

Inheritance

Constructors

DataTablePlus({Key? key, required List<DataColumn> columns, int? sortColumnIndex, bool sortAscending = true, ValueSetter<bool?>? onSelectAll, Decoration? decoration, MaterialStateProperty<Color?>? dataRowColor, double? dataRowHeight, TextStyle? dataTextStyle, MaterialStateProperty<Color?>? headingRowColor, double? headingRowHeight, TextStyle? headingTextStyle, double? horizontalMargin, double? bottomMargin, double? columnSpacing, bool showCheckboxColumn = true, bool showBottomBorder = false, double? dividerThickness, ScrollController? scrollController, required List<DataRow> rows, Map<int, TableColumnWidth>? tableColumnsWidth, List<CustomRow>? customRows, bool showCheckboxSelectAll = true})

Properties

border TableBorder?
The style to use when painting the boundary and interior divisions of the table.
finalinherited
bottomMargin double?
If set the table will have empty space added after the the last row and allow scroll the core of the table higher (e.g. if you would like to have iOS navigation UI at the bottom overlapping the table and have the ability to slightly scroll up the bototm row to avoid the obstruction)
final
checkboxHorizontalMargin double?
Horizontal margin around the checkbox, if it is displayed.
finalinherited
clipBehavior Clip
The content will be clipped (or not) according to this option.
finalinherited
columns List<DataColumn>
The configuration and labels for the columns in the table.
finalinherited
columnSpacing double?
The horizontal margin between the contents of each data column.
finalinherited
customRows List<CustomRow>?
final
dataRowColor MaterialStateProperty<Color?>?
The background color for the data rows.
finalinherited
dataRowHeight double?
The height of each row (excluding the row that contains column headings).
no setterinherited
dataRowMaxHeight double?
The maximum height of each row (excluding the row that contains column headings).
finalinherited
dataRowMinHeight double?
The minimum height of each row (excluding the row that contains column headings).
finalinherited
dataTextStyle TextStyle?
The text style for data rows.
finalinherited
decoration Decoration?
The background and border decoration for the table.
finalinherited
dividerThickness double?
The width of the divider that appears between TableRows.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
headingRowColor MaterialStateProperty<Color?>?
The background color for the heading row.
finalinherited
headingRowHeight double?
The height of the heading row.
finalinherited
headingTextStyle TextStyle?
The text style for the heading row.
finalinherited
horizontalMargin double?
The horizontal margin between the edges of the table and the content in the first and last cells of each row.
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onSelectAll ValueSetter<bool?>?
Invoked when the user selects or unselects every row, using the checkbox in the heading row.
finalinherited
rows List<DataRow>
The data to show in each row (excluding the row that contains the column headings).
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollController ScrollController?
Exposes scroll controller of the SingleChildScrollView that makes data rows horizontally scrollable
final
showBottomBorder bool
Whether a border at the bottom of the table is displayed.
finalinherited
showCheckboxColumn bool
Whether the widget should display checkboxes for selectable rows.
finalinherited
showCheckboxSelectAll bool
final
sortAscending bool
Whether the column mentioned in sortColumnIndex, if any, is sorted in ascending order.
finalinherited
sortColumnIndex int?
The current primary sort key's column.
finalinherited
tableColumnsWidth Map<int, TableColumnWidth>?
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
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}) 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