copyWith method

Budget copyWith({
  1. String? name,
  2. Renewal? renewal,
  3. Money? size,
  4. DateTime? start,
  5. List<MoneyTransaction>? transactions,
})

Creates a copy of this Budget instance where the only changes are those specified in the parameters of this method.

Implementation

Budget copyWith({
  String? name,
  Renewal? renewal,
  Money? size,
  DateTime? start,
  List<MoneyTransaction>? transactions,
}) =>
    Budget(
      name: name ?? this.name,
      renewal: renewal ?? this.renewal,
      size: size ?? this.size,
      start: start ?? this.start,
      transactions: transactions ?? this.transactions,
    );