error property
The error of a failed initialization.
Throws a StateError when there is none.
Implementation
@override
Object get error => switch (model.state) {
AsyncScopeWaiting() ||
AsyncScopeProgress() ||
AsyncScopeReady() =>
throw StateError('No error'),
AsyncScopeError(:final error) => error,
};