AsyncError<T> constructor
const
AsyncError<T> (
- Object error,
- StackTrace stackTrace
Creates an AsyncValue in the error state.
I don't have a StackTrace, what can I do? You can still construct an AsyncError by passing StackTrace.current:
AsyncValue.error(error, StackTrace.current);
Implementation
const AsyncError(Object error, StackTrace stackTrace)
: this._(
error,
stackTrace: stackTrace,
isLoading: false,
hasValue: false,
value: null,
);