mirrored_repositories/boorusphere/lib/presentation/provider/booru
import 'package:freezed_annotation/freezed_annotation.dart';

part 'fetch_result.freezed.dart';

@freezed
sealed class FetchResult<T> with _$FetchResult<T> {
  const factory FetchResult.idle(T data) = IdleFetchResult;
  const factory FetchResult.data(T data) = DataFetchResult;
  const factory FetchResult.loading(T data) = LoadingFetchResult;
  const factory FetchResult.error(
    T data, {
    Object? error,
    StackTrace? stackTrace,
  }) = ErrorFetchResult;
}
