A wrapper for DataTable that obtains data lazily from a DataTableSource and displays it one page at a time. The widget is presented as a Card.

Inheritance

Constants

defaultRowsPerPage int

The default value for rowsPerPage.

10

Constructors

PaginatedDataTable({Key key, @required Widget header, List<Widget> actions, 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.

read-only
availableRowsPerPage List<int>

The options to offer for the rowsPerPage.

read-only
columns List<DataColumn>

The configuration and labels for the columns in the table.

read-only

The table card's header.

read-only
initialFirstRowIndex int

The index of the first row to display when the widget is first created.

read-only
onPageChanged ValueChanged<int>

Invoked when the user switches to another page.

read-only
onRowsPerPageChanged ValueChanged<int>

Invoked when the user selects a different number of rows per page.

read-only
onSelectAll ValueSetter<bool>

Invoked when the user selects or unselects every row, using the checkbox in the heading row.

read-only
rowsPerPage int

The number of rows to show on each page.

read-only
sortAscending bool

Whether the column mentioned in sortColumnIndex, if any, is sorted in ascending order.

read-only
sortColumnIndex int

The current primary sort key's column.

read-only
source DataTableSource

The data source which provides data to show in each row. Must be non-null.

read-only
hashCode int

Get a hash code for this object.

read-only, inherited
key Key

Controls how one widget replaces another widget in the tree.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

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
debugFillDescription(List<String> description) → void

Add additional information to the given description for use by toString.

inherited
noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() String

Returns a string representation of this object.

inherited
toStringShort() String

A short, textual description of this widget.

inherited