save method
Saves a snapshot to storage.
Parameters:
snapshot: The snapshot to savekey: Optional key/identifier for the snapshot. If not provided, a default key will be used.
Returns: A Future that completes when the snapshot is saved.
Throws:
- Storage-specific exceptions (e.g., IOException for file storage)
Implementation
@override
Future<void> save(Snapshot snapshot, [String? key]) async {
final storageKey = key ?? defaultKey;
_storage[storageKey] = snapshot;
debugPrint('[Checkpoint] Saved snapshot in memory with key: $storageKey');
}