TableAdvancedController<T> class

Controller to manage content and properties of TableAdvanced.

Inheritance

Constructors

TableAdvancedController({List<T>? items, int? rowsCountToPaginate, TableMode mode = TableMode.paginationScroll, void onCheckItems(List<T> items)?, Future<List<T>?> onChangePage(int page, int pageSize)?, int rowsToShow = 10})
Controller to manage content and properties of TableAdvanced.

Properties

checkedItems List<T>
The list of checked items.
final
currentPage int
The page currently shown in the table. Defaults to 1.
getter/setter pair
dataItems List<T>
The entire list of items populating the table (independent of pagination)
getter/setter pair
dataItemsToShow List<T>
The list of items shown in the table for the current page and configuration
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
items List<T>?
List of items to use to populate rows.
final
mode TableMode
The table mode tu use.
final
onChangePage Future<List<T>?> Function(int page, int pageSize)?
The method fired when the page shown by the table changes.
final
onCheckItems → void Function(List<T> items)?
The method fired when row checkboxes are flagged/unflagged. Note that the entire list of flagged items is returned everytime a row is checked.
final
pageCount int
The number of pages of the table for pagination.
getter/setter pair
rowsCountToPaginate int
The total number of items to use in the table pagination.
getter/setter pair
rowsToShow int
Number of rows to show in a page of the table. Defaults to 10.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
changeNumberOfRowsToShow(int number) → void
Changed the number of rows to show per page
checkItems(List<T> items, {bool checkAll = false}) → void
Check or uncheck the specified items.
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
goToNextPage() → void
Goes to the next page of the table
goToPage(int page, {bool pageStartsFromZero = false}) → void
Goes to the specified page
goToPreviousPage() → void
Goes to the previous page of the table
initScrollController() ScrollController?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
reloadCurrentPage() → void
Reloads data for current page
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
setItems(List<T> items, {bool replace = false, bool reload = false}) → void
Set items to populate the table.
setRowsCount(int count) → void
Change the number of rows to show per page
toString() String
A string representation of this object.
inherited

Operators

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