DynamicTable class
Constructors
DynamicTable ({Key ? key , bool showActions = false , List <Widget > ? actions , required List <DynamicTableDataColumn > columns , int ? sortColumnIndex , bool sortAscending = true , ValueSetter <bool ? > ? onSelectAll , double dataRowMinHeight = kMinInteractiveDimension , double dataRowMaxHeight = kMinInteractiveDimension , double headingRowHeight = 56.0 , double horizontalMargin = 24.0 , double columnSpacing = 56.0 , bool showCheckboxColumn = true , bool showFirstLastButtons = false , int ? initialFirstRowIndex = 0 , ValueChanged <int > ? onPageChanged , int rowsPerPage = defaultRowsPerPage , List <int > availableRowsPerPage = const <int>[defaultRowsPerPage, defaultRowsPerPage * 2, defaultRowsPerPage * 5, defaultRowsPerPage * 10] , ValueChanged <int ? > ? onRowsPerPageChanged , DragStartBehavior dragStartBehavior = DragStartBehavior.start , Color ? arrowHeadColor , double ? checkboxHorizontalMargin , ScrollController ? controller , bool ? primary , bool onRowEdit (int index , List row )?, required List <DynamicTableDataRow > rows , String actionColumnTitle = "Actions" , bool onRowDelete (int index , List row )?, List ? onRowSave (int index , List oldValue , List newValue )?, bool showDeleteAction = false , bool showAddRowButton = false })
Creates a widget describing a paginated DataTable on a Card .
Properties
actionColumnTitle
→ String
The title of the last column of the table.
This is used to display the actions.
Defaults to "Actions"
final
actions
→ List <Widget > ?
Icon buttons to show at the top end side of the table. The header must
not be null to show the actions.
final
arrowHeadColor
→ Color ?
Defines the color of the arrow heads in the footer.
final
availableRowsPerPage
→ List <int >
The options to offer for the rowsPerPage.
final
checkboxHorizontalMargin
→ double ?
Horizontal margin around the checkbox, if it is displayed.
final
columns
→ List <DynamicTableDataColumn >
The configuration and labels for the columns in the table.
final
columnSpacing
→ double
The horizontal margin between the contents of each data column.
final
controller
→ ScrollController ?
An object that can be used to control the position to which this scroll
view is scrolled.
final
dataRowMaxHeight
→ double
The maximum height of each row (excluding the row that contains column headings).
final
dataRowMinHeight
→ double
The minimum height of each row (excluding the row that contains column headings).
final
dragStartBehavior
→ DragStartBehavior
The data source which provides data to show in each row. Must be non-null.
final
hashCode
→ int
The hash code for this object.
no setter inherited
The table card's optional header.
final
headingRowHeight
→ double
The height of the heading row.
final
horizontalMargin
→ double
The horizontal margin between the edges of the table and the content
in the first and last cells of each row.
final
initialFirstRowIndex
→ int ?
The index of the first row to display when the widget is first created.
final
key
→ Key ?
Controls how one widget replaces another widget in the tree.
final inherited
onPageChanged
→ ValueChanged <int > ?
Invoked when the user switches to another page.
final
onRowDelete
→ bool Function(int index , List row ) ?
Called when the user clicks on the delete icon of a row.
final
onRowEdit
→ bool Function(int index , List row ) ?
Called when the user clicks on the edit icon of a row.
final
onRowSave
→ List ? Function(int index , List oldValue , List newValue ) ?
Called when the user clicks on the save icon of a row.
final
onRowsPerPageChanged
→ ValueChanged <int ? > ?
Invoked when the user selects a different number of rows per page.
final
onSelectAll
→ ValueSetter <bool ? > ?
Invoked when the user selects or unselects every row, using the
checkbox in the heading row.
final
primary
→ bool ?
Whether this is the primary scroll view associated with the parent
PrimaryScrollController .
final
rows
→ List <DynamicTableDataRow >
The data for the rows of the table.
final
rowsPerPage
→ int
The number of rows to show on each page.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
showActions
→ bool
Whether to show the actions column.
Defaults to true.
If set to true and showDeleteAction is set to false, the actions column will be displayed but the delete action will not be displayed.
If set to true and showDeleteAction is set to true, the actions column will be displayed and the delete action will be displayed.
final
showAddRowButton
→ bool
Whether to show the add row button.
Defaults to true.
If set to true and showActions is set to false, exception will be thrown because the actions column is required to save the new row.
final
showCheckboxColumn
→ bool
Whether the widget should display checkboxes for selectable rows.
final
showDeleteAction
→ bool
Whether to show the delete action.
Defaults to true.
If set to true and showActions is set to false, the delete action will be displayed but the actions column will not be displayed.
final
showFirstLastButtons
→ bool
Flag to display the pagination buttons to go to the first and last pages.
final
sortAscending
→ bool
Whether the column mentioned in sortColumnIndex , if any, is sorted
in ascending order.
final
sortColumnIndex
→ int ?
The current primary sort key's column.
final
dynamic_table 0.0.1-beta.2