createSnapshot method
Create a snapshot of current state Override to provide custom snapshot logic
Implementation
@protected
Future<void> createSnapshot() async {
final state = await getSnapshotState();
if (state != null) {
await _eventStore.saveSnapshot(_persistenceId, state, _sequenceNumber);
await onSnapshotCreated(state, _sequenceNumber);
}
}