getLatestSnapshot method
The newest snapshot stored for documentId.
null when this registry does not serve documentId, and null when it
serves it but no snapshot has been stored yet.
Implementation
@override
Future<Snapshot?> getLatestSnapshot(String documentId) async {
if (!await hasDocument(documentId)) {
return null;
}
final open = await _openDocument(documentId);
return open.persistence.storage.snapshots.getLatestSnapshot();
}