VooLocalDataSource<T> class
Local data source implementation for VooDataGrid
This data source works with in-memory data and provides client-side filtering, sorting, and pagination.
- Inheritance
-
- Object
- ChangeNotifier
- VooDataGridSource<
T> - VooLocalDataSource
Constructors
-
VooLocalDataSource.new({required List<
T> data, VooSelectionMode selectionMode = VooSelectionMode.none}) - Constructor
Properties
-
allRows
→ List<
T> -
no setterinherited
- currentPage → int
-
no setterinherited
- error → String?
-
no setterinherited
-
filters
→ Map<
String, VooDataFilter> -
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isLoading → bool
-
no setterinherited
- mode → VooDataGridMode
-
no setterinherited
- pageSize → int
-
no setterinherited
-
rows
→ List<
T> -
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selectedRows
→ Set<
T> -
no setterinherited
- selectionMode → VooSelectionMode
-
no setterinherited
-
sorts
→ List<
VooColumnSort> -
no setterinherited
- totalPages → int
-
Get total number of pages
no setterinherited
- totalRows → int
-
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
applyFilter(
String field, VooDataFilter? filter) → void -
Apply filter to a column
inherited
-
applySort(
String field, VooSortDirection direction) → void -
Apply sort to a column
inherited
-
changePage(
int page) → void -
Change page
inherited
-
changePageSize(
int size) → void -
Change page size
inherited
-
clearFilters(
) → void -
Clear all filters
inherited
-
clearSelection(
) → void -
Clear selection
inherited
-
clearSorts(
) → void -
Clear all sorts
inherited
-
deselectAllRows(
) → void -
Deselect all rows (alias for clearSelection)
inherited
-
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
-
fetchRemoteData(
{required int page, required int pageSize, required Map< String, VooDataFilter> filters, required List<VooColumnSort> sorts}) → Future<VooDataGridResponse< T> > -
Fetch data from remote source (required for remote and mixed modes)
inherited
-
loadData(
) → Future< void> -
Load data with current settings
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
refresh(
) → Future< void> -
Refresh data
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
selectAll(
) → void -
Select all rows
inherited
-
selectAllRows(
) → void -
Select all rows (alias for selectAll)
inherited
-
setLocalData(
List< T> data) → void -
Set local data (for local mode)
inherited
-
setLocalDataAsync(
List< T> data) → Future<void> -
Set local data and wait for processing (for tests)
inherited
-
setMode(
VooDataGridMode newMode) → void -
Set operation mode
inherited
-
setSelectionMode(
VooSelectionMode mode) → void -
Set selection mode
inherited
-
toggleRowSelection(
T row) → void -
Select/deselect a row
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited