PagedDataTableController<TKey extends Comparable, TResultId extends Comparable, TResult extends Object> class
Represents a controller of a PagedDataTable
Constructors
Properties
- changes → Listenable
-
Notifica a ogni cambio di stato della tabella (fetch start/end, append,
filtro, selezione). Utile all'esterno per reagire ai reload (es. auto-fill
infinite scroll dopo una ricerca, quando la pagina non si ricostruisce).
no setter
-
currentDataset
→ List<
TResult> -
Returns the current showing dataset elements as an unmodifiable list.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasNextPage → bool
-
True se esiste un'altra pagina dopo quella corrente.
no setter
- isAttached → bool
-
no setter
- isLoading → bool
-
True mentre è in corso un fetch.
no setter
- paginationInfo → PagedDataTablePaginationInfo
-
Returns the actual pagination info
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
advancePage(
) → Future< void> - Advances to the next page.
-
backPage(
) → Future< void> - Backs off to the previous page.
-
clearAllSelections(
) → void - Deseleziona TUTTE le righe su tutte le pagine (cross-page clear)
-
dispose(
) → void - Disposes the controller.
-
getFilter(
String filterName) → dynamic - Gets the value of a filter
-
getFilters(
) → Map< String, dynamic> - Returns a Map where each key is the field name and its value the current field's value
-
getSelectedRows(
) → List< TResult> - Returns a list of the selected items.
-
loadNextPage(
) → Future< void> - Carica la pagina successiva in APPEND (infinite scroll guidato dall'esterno, es. la pagina che possiede lo scroll). No-op se non c'è next page o è già in caricamento → safe da chiamare a ogni evento di scroll.
-
modifyRowsValue(
bool predicate(TResult element), void update(TResult item)) → void -
Updates every item from the current resultset that matches
predicateand rebuilds it. -
modifyRowValue(
TResultId itemId, void update(TResult item)) → void -
Updates an item from the current resultset with the id
itemIdand rebuilds the row. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
{bool currentDataset = true}) → Future< void> -
Refreshes the table fetching from source again.
If
currentDatasetis true, it will only refresh the current viewing resultset, otherwise, it will start from page 1. -
refreshRow(
TResultId itemId) → void -
Rebuilds the row which has the specified
itemIdto reflect changes to the item. -
refreshRowWhere(
bool predicate(TResult element)) → void -
Builds every row that matches
predicate. -
removeFilter(
String id) → void - Removes a filter and fetches items from source.
-
removeFilters(
) → void - Removes any applied filter.
-
removeRow(
TResultId itemId) → void -
Removes the row containing an element whose id is
itemId -
selectAllRows(
) → void - Selects all the rows in the current resultset
-
selectRow(
TResultId itemId) → void -
Marks the row whose id is
itemIdas selected -
setFilter(
String id, dynamic value) → void - Sets a filter and fetches items from source.
-
toString(
) → String -
A string representation of this object.
inherited
-
unselectAllRows(
) → void - Unselects any selected row in the current resultset
-
unselectRow(
TResultId itemId) → void -
Marks the row whose id is
itemIdas unselected
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited