currentState property
Current state of the aggregate (non-nullable) Throws if the aggregate hasn't been initialized
Implementation
TState get currentState {
if (_currentState == null) {
throw StateError('Aggregate $_aggregateId has not been initialized');
}
return _currentState!;
}