Repository<K, T> class
final
Typed facade over one Resource.
Properties
Methods
-
get(
K id, {bool forceRefresh = false}) → Future< Snapshot< T> > -
Reads
idfollowing the freshness windows (fresh / SWR / fetch / stale-if-error / stale-if-offline). Never throws for network errors: they are reported in Snapshot.error. -
invalidate(
K id) → Future< void> -
Marks
idfor revalidation on the next read. -
keyOf(
K id) → RecordKey -
mutate(
K id, Mutation< T> mutation, {List<OpId> dependsOn = const []}) → Future<OpHandle> -
Enqueues
mutationatomically. Returns once the op is durable; the UI sees the optimistic value immediately through get/watch. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
peek(
K id) → Future< Snapshot< T> > - Local-only read: never touches the network.
-
pin(
K id, {bool pinned = true}) → Future< void> -
Pins
idso it is never evicted. -
toString(
) → String -
A string representation of this object.
inherited
-
watch(
K id) → Stream< Snapshot< T> > -
Reads and then follows every committed change of
id(optimistic writes, acknowledgements, refreshes). Duplicate snapshots are skipped.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited