onChange property

  1. @override
Stream<Set<String>> get onChange
override

Fires once per change — a write outside a batch, or a whole batch — with the dependency keys (entity.field, see depKey, plus entity.field[i] / entity.field[length] for inline lists) it touched, synchronously. Nothing fires when nothing changed (a refetch returning the same data).

A persistence layer debounces on it and reads changesSince rather than a whole snapshot.

Implementation

@override
Stream<Set<String>> get onChange => _changes.stream;