afterSnapshot method
Waits for the snapshot and the prune it caused to reach the disk.
The waiting is the point: a caller that broadcasts this snapshot has to know it survives a crash before the clients start replaying against it.
Implementation
@override
Future<void> afterSnapshot(String documentId, Snapshot snapshot) async {
await (await _openDocument(documentId)).persistence.flush();
}