AsyncValue<T>.error constructor

const AsyncValue<T>.error(
  1. Object error,
  2. 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

// coverage:ignore-start
const factory AsyncValue.error(Object error, StackTrace stackTrace) =
    AsyncError<T>;