copyWith method

Data<V> copyWith({
  1. V? value,
  2. Object? error,
  3. bool? isLoading,
})

Create copy of this Data object with new params.

Implementation

Data<V> copyWith({
  V? value,
  Object? error,
  bool? isLoading,
}) {
  return Data(
    value: value ?? this.value,
    error: error ?? this.error,
    isLoading: isLoading ?? this.isLoading,
  );
}