PagedDataTableController<K extends Comparable<K>, T> class final

PagedDataTableController represents the state of a PagedDataTable of type T, using pagination keys of type K.

Is recommended that T specifies a custom hashCode and equals method for comparison reasons.

Inheritance

Constructors

PagedDataTableController()

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
hasNextPage bool
A flag that indicates if the dataaset has a next page
no setter
hasPreviousPage bool
A flag that indicates if the dataset has a previous page
no setter
pageSize int
The current page size
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedItems List<T>
The list of selected items.
no setter
selectedRows List<int>
The list of selected row indexes
no setter
sortModel SortModel?
The current sort model of the table
getter/setter pair
totalItems int
The current amount of items that are being displayed on the current page
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addRowChangeListener(int index, RowChangeListener<K, T> onRowChange) → void
Registers a callback that gets called when the row at index is updated.
applyFilters() → void
Applies the current set filters
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
inherited
insert(T value) → void
Inserts value at the bottom of the current dataset
insertAt(int index, T value) → void
Inserts value in the current dataset at the specified index
nextPage() Future<void>
Advances to the next page
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
previousPage() Future<void>
Comes back to the previous page
printDebugString() → void
Prints a helpful debug string. Only works in debug mode.
refresh({bool fromStart = false}) → void
Refreshes the state of the table.
removeFilter(String filterId) → void
Removes a filter, changing its value to null.
removeFilters() → void
Removes all the set filters, changing their values to null.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeRow(T item) → void
Removes the row with item from the dataset.
removeRowAt(int index) → void
Removes a row at the specified index.
removeRowChangeListener(int index, RowChangeListener<K, T> rowChangeListener) → void
Unregisters a row change callback.
replace(int index, T value) → void
Replaces the element at index with value
selectAllRows() → void
Marks every row in the current resultset as selected
selectRow(int index) → void
Marks a row as selected
setFilter(String filterId, dynamic value) → void
Sets filter filterId's value.
swipeSortModel([String? columnId]) → void
Swipes the current sort model or sets it to columnId.
toggleRow(int index) → void
Selects or unselects a row
toString() String
A string representation of this object.
inherited
unselectAllRows() → void
Unselects every row
unselectRow(int index) → void
Unselects a row if was selected before

Operators

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