PaginatedDataTable class

A material design data table that shows data using multiple pages.

A paginated data table shows rowsPerPage rows of data per page and provides controls for showing other pages.

Data is read lazily from from a DataTableSource. The widget is presented as a Card.

See also:

Inheritance

Constructors

PaginatedDataTable({Key key, @required Widget header, List<Widget> actions, @required List<DataColumn> columns, int sortColumnIndex, bool sortAscending: true, ValueSetter<bool> onSelectAll, int initialFirstRowIndex: 0, ValueChanged<int> onPageChanged, int rowsPerPage: defaultRowsPerPage, List<int> availableRowsPerPage: const [defaultRowsPerPage, defaultRowsPerPage * 2, defaultRowsPerPage * 5, defaultRowsPerPage * 10], ValueChanged<int> onRowsPerPageChanged, @required DataTableSource source })
Creates a widget describing a paginated DataTable on a Card. [...]

Properties

actions List<Widget>
Icon buttons to show at the top right of the table. [...]
final
availableRowsPerPage List<int>
The options to offer for the rowsPerPage. [...]
final
columns List<DataColumn>
The configuration and labels for the columns in the table.
final
The table card's header. [...]
final
initialFirstRowIndex int
The index of the first row to display when the widget is first created.
final
onPageChanged ValueChanged<int>
Invoked when the user switches to another page. [...]
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
rowsPerPage int
The number of rows to show on each page. [...]
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
source DataTableSource
The data source which provides data to show in each row. Must be non-null. [...]
final
hashCode int
The hash code for this object. [...]
read-only, inherited
key Key
Controls how one widget replaces another widget in the tree. [...]
final, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

createState() PaginatedDataTableState
Creates the mutable state for this widget at a given location in the tree. [...]
createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree. [...]
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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 toStringDeep. [...]
inherited
toString({DiagnosticLevel minLevel: DiagnosticLevel.debug }) String
Returns 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 ==(dynamic other) bool
The equality operator. [...]
inherited

Constants

defaultRowsPerPage → const int
The default value for rowsPerPage. [...]
10