AsyncSnapshotWithProgress<T, ProgressType extends Object>.withError constructor

const AsyncSnapshotWithProgress<T, ProgressType extends Object>.withError(
  1. ConnectionState state,
  2. Object error, [
  3. StackTrace stackTrace = StackTrace.empty,
  4. ProgressType? progress,
])

Creates an AsyncSnapshotWithProgress in the specified state with the specified error and a stackTrace.

If no stackTrace is explicitly specified, StackTrace.empty will be used instead.

Implementation

const AsyncSnapshotWithProgress.withError(
  ConnectionState state,
  Object error, [
  StackTrace stackTrace = StackTrace.empty,
  ProgressType? progress,
]) : this._(state, null, error, stackTrace, progress);