copyWithError method

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

Implementation

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