copyWith method
MoneyTransaction
copyWith({
- DateTime? dateTime,
- String? description,
- ExpenseOrIncome? expenseOrIncome,
- String? id,
- MoneyTransactionMethod? method,
- Money? value,
Creates a copy of this MoneyTransaction
instance where the only changes
are those specified in the parameters of this method.
Implementation
MoneyTransaction copyWith({
DateTime? dateTime,
String? description,
ExpenseOrIncome? expenseOrIncome,
String? id,
MoneyTransactionMethod? method,
Money? value,
}) =>
MoneyTransaction(
dateTime: dateTime ?? this.dateTime,
description: description ?? this.description,
expenseOrIncome: expenseOrIncome ?? this.expenseOrIncome,
id: id ?? this.id,
method: method ?? this.method,
value: value ?? this.value,
);