copyWith method

LoadableState<T> copyWith({
  1. bool? isLoading,
  2. T? data,
  3. String? errorMessage,
  4. bool? hasLoaded,
})

Implementation

LoadableState<T> copyWith({
  bool? isLoading,
  T? data,
  String? errorMessage,
  bool? hasLoaded,
}) {
  return LoadableState(
    isLoading: isLoading ?? this.isLoading,
    data: data ?? this.data,
    errorMessage: errorMessage,
    hasLoaded: hasLoaded ?? this.hasLoaded,
  );
}