MoneyTransaction class

This class models a representation of a money transaction.

Implemented types
Annotations

Constructors

MoneyTransaction({String budgetName = '', required DateTime dateTime, required String description, required ExpenseOrIncome expenseOrIncome, required String id, required MoneyTransactionMethod method, Place place = const Place(address: '', position: LatLng(0, 0), tags: []), List<String> tags = const [], required Money value})
Representation of a money transaction.
const
MoneyTransaction.fromMap(Map<String, dynamic> map)
Creates an MoneyTransaction instance starting from a Map<String, dynamic> map.

Properties

budgetName String
The name of the budget associated with this transaction.
final
dateTime DateTime
The date and time when this transaction is made.
final
description String
The description of this transaction.
final
expenseOrIncome ExpenseOrIncome
Indicates whether this transaction is an expense or an income.
final
hashCode int
The hash code for this object.
no setteroverride
id String
The identificator of this transaction. It should be unique.
final
method MoneyTransactionMethod
The method used for this transaction.
final
place → Place
The place where the transaction occured.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tags List<String>
Returns the sorted list of tags, each of which with only 1 occurrence.
no setter
value Money
The value, or amount, of this transaction.
final

Methods

addTag(String tag) → void
Add a tag to the list of the tags for this place.
compareTo(covariant MoneyTransaction other) int
The order of the comparisons is:
override
copyWith({DateTime? dateTime, String? description, ExpenseOrIncome? expenseOrIncome, String? id, MoneyTransactionMethod? method, Money? value}) MoneyTransaction
Creates a copy of this MoneyTransaction instance where the only changes are those specified in the parameters of this method.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Creates a Map<String, dynamic> map representation of this instance.
toString() String
A string representation of this object.
inherited

Operators

operator <(covariant MoneyTransaction other) bool
Returns if this instance is less than the other.
operator <=(covariant MoneyTransaction other) bool
Return if this instance is less than or equal to the other.
operator ==(covariant MoneyTransaction other) bool
The equality operator.
override
operator >(covariant MoneyTransaction other) bool
Return if this instance is greater than the other.
operator >=(covariant MoneyTransaction other) bool
Return if this instance is greater than or equal to the other.