copyWith method

SavingsPot copyWith({
  1. String? id,
  2. String? name,
  3. Money? target,
  4. Money? current,
  5. double? interestRate,
  6. bool? hasOwnAccountNumber,
  7. String? imageUrl,
  8. List<String>? memberIds,
  9. DateTime? targetDate,
  10. bool? isRoundUpDestination,
})

Implementation

SavingsPot copyWith({
  String? id,
  String? name,
  Money? target,
  Money? current,
  double? interestRate,
  bool? hasOwnAccountNumber,
  String? imageUrl,
  List<String>? memberIds,
  DateTime? targetDate,
  bool? isRoundUpDestination,
}) =>
    SavingsPot(
      id: id ?? this.id,
      name: name ?? this.name,
      target: target ?? this.target,
      current: current ?? this.current,
      interestRate: interestRate ?? this.interestRate,
      hasOwnAccountNumber: hasOwnAccountNumber ?? this.hasOwnAccountNumber,
      imageUrl: imageUrl ?? this.imageUrl,
      memberIds: memberIds ?? this.memberIds,
      targetDate: targetDate ?? this.targetDate,
      isRoundUpDestination: isRoundUpDestination ?? this.isRoundUpDestination,
    );