snapshots method

Stream<InAppQuerySnapshot> snapshots()

Implementation

Stream<InAppQuerySnapshot> snapshots() {
  final n = _db._addNotifier(path);
  Future.delayed(const Duration(seconds: 1)).whenComplete(_notify);
  return Stream.multi((c) {
    void update() => c.add(n.value ?? InAppQuerySnapshot(id));
    n.addListener(update);
    c.onCancel = () => n.removeListener(update);
  });
}