copyWith method

Account copyWith({
  1. String? id,
  2. String? name,
  3. AccountType? type,
  4. bool? onBudget,
  5. bool? closed,
  6. String? note,
  7. num? balance,
  8. num? clearedBalance,
  9. num? unclearedBalance,
  10. String? transferPayeeId,
  11. bool? directImportLinked,
  12. bool? directImportInError,
  13. bool? deleted,
})

Implementation

Account copyWith(
    {String? id,
    String? name,
    enums.AccountType? type,
    bool? onBudget,
    bool? closed,
    String? note,
    num? balance,
    num? clearedBalance,
    num? unclearedBalance,
    String? transferPayeeId,
    bool? directImportLinked,
    bool? directImportInError,
    bool? deleted}) {
  return Account(
      id: id ?? this.id,
      name: name ?? this.name,
      type: type ?? this.type,
      onBudget: onBudget ?? this.onBudget,
      closed: closed ?? this.closed,
      note: note ?? this.note,
      balance: balance ?? this.balance,
      clearedBalance: clearedBalance ?? this.clearedBalance,
      unclearedBalance: unclearedBalance ?? this.unclearedBalance,
      transferPayeeId: transferPayeeId ?? this.transferPayeeId,
      directImportLinked: directImportLinked ?? this.directImportLinked,
      directImportInError: directImportInError ?? this.directImportInError,
      deleted: deleted ?? this.deleted);
}