RowScope class

A sub-scope of a QueryScope for one part of its tree — typically one row of a long list — that rebuilds on its own (SlingRow is the widget form).

Accessors rebound to it (bind) read through the same cache and add to the same selection tree as the parent's, and misses and writes go to the parent (it still owns the request, loading and error state); only the dependency keys are this scope's own. A write to Launch:x.favorite then re-runs the one row that read it instead of the parent's whole build — the parent depends only on what it read itself (the list).

A row keeps working through a parent rebuild: the parent hands it fresh accessors, bound again on the row's next run.

Implemented types

Properties

cache → Cache
no setteroverride
deps → Set<String>
Dependency keys read during the last run (and by accessors bound in it afterwards).
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
onChanged → void Function()
Invoked when a write touched one of this row's deps.
final
operation → String
query, mutation or subscription.
no setteroverride
parent → QueryScope<Accessor>
The query scope misses, writes, selections and fetch state belong to.
final
root → Selection
Root of the selection tree recorded in the current scope.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind<A extends Accessor>(A accessor, A ctor(Recorder, Selection, List<Object>)) → A
Rebinds accessor (an accessor handed out by the parent or by another row of it) to this scope, via its generated constructor ctor.
dispose() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onMiss(Selection leaf) → void
Called when a field was read but is not in the cache. For object and list fields the node itself is reported (its children come as the skeleton accessors are read).
override
onWrite(CacheWrite write) → void
Called on manual writes (generated setters) so dependants can be re-rendered and, during a mutation's optimistic phase, so the write can be undone if the mutation fails.
override
run<A extends Accessor, T>(A accessor, A ctor(Recorder, Selection, List<Object>), T body(A bound)) → T
Runs body with accessor bound to this scope and fresh deps.
toString() → String
A string representation of this object.
inherited

Operators

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