LatticeDataSource<T> class abstract

Supplies rows for a GridQuery.

Implement this to put a grid in front of anything: a list in memory, a SQLite table, a REST endpoint, a stream. The grid only ever asks for the page it is about to show, so a remote source never has to materialise the whole table.

Mixed-in types
Implementers

Constructors

LatticeDataSource()

Properties

canCommit → bool
Whether this source can write an edited row back.
no setter
capabilities → SourceCapabilities
Everything this source can do, in one value.
no setter
columns ↔ Map<String, GridColumn<T>>
Columns, so the source can read and compare values.
getter/setter pair
columnTypes → Map<String, ColumnType>
Each column's declared type, for compiling a filter against it.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
no setterinherited
hasMore → bool
Whether rows exist beyond the last result, for a grid that loads more as the user scrolls rather than paging.
no setter
isDisposed → bool
no setterinherited
isLocal → bool
Whether rows are resolved locally. Remote sources return false, which tells the grid to re-query on every sort, filter or page change.
no setter
isSynchronous → bool
Whether this source can answer inside the current frame, through fetchSync.
no setter
lastChanges → Set<GridChange>
What the most recent notification was about.
no setterinherited
localRows → List<T>?
Every row this source holds, or null when it cannot say.
no setter
providesDistinctValues → bool
Whether distinctValuesFor answers with real values.
no setter
providesStats → bool
Whether statsFor answers with real ranges rather than ColumnStats.empty.
no setter
revision → int
Increments whenever the rows or columns change.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
supportsCancellation → bool
Whether this source honours GridQuery.signal by abandoning the work.
no setter
supportsLazyGroups → bool
Whether this source can answer a GridQuery.lazyGroups query, returning group headers with counts and the rows of a group only when asked.
no setter
supportsLoadMore → bool
Whether this source can extend itself a slice at a time.
no setter

Methods

addChangeListener(GridChangeListener listener) → void
Registers a listener that is told what changed.
inherited
addListener(GridListener listener) → void
inherited
batch<R>(R action()) → R
Runs action, emitting at most one notification afterwards.
inherited
bumpRevision() → void
Marks derived state stale. Call from any mutator.
commit(T original, T updated) → Future<T>
Writes updated back in place of original.
commitAll(List<RowUpdate<T>> writes) → Future<List<T>>
Writes several rows as one change, returning them in the order given.
dispose() → void
inherited
distinctValuesFor(String field, {int limit = 500}) → DistinctValues
The distinct values of field for a checkbox filter list.
fetch(GridQuery query) → Future<GridResult<T>>
Resolves query.
fetchGroupChildren(GridQuery query, GroupNode<T> node) → Future<GroupChildren<T>>
Resolves the contents of one group.
fetchSync(GridQuery query) → GridResult<T>
Resolves query now, without awaiting.
invalidate() → void
Tells the grid to re-run its current query, e.g. after a write.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners({Set<GridChange>? changes}) → void
Notifies listeners, unless a batch is in progress.
inherited
removeChangeListener(GridChangeListener listener) → void
inherited
removeListener(GridListener listener) → void
inherited
statsFor(String field) → ColumnStats
Range of the values currently shown in field, for conditional formatting. Sources that cannot answer cheaply return ColumnStats.empty, which leaves rules inert rather than wrong.
toString() → String
A string representation of this object.
inherited

Operators

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