copyWithError method

StateSnapshot<V> copyWithError(
  1. Object error, {
  2. bool? isLoading,
  3. bool includeValue = true,
})

Implementation

StateSnapshot<V> copyWithError(
  Object error, {
  bool? isLoading,
  bool includeValue = true,
}) =>
    StateSnapshot._raw(
      includeValue ? value : null,
      error,
      isLoading: isLoading ?? this.isLoading,
      source: includeValue ? source : null,
    );