Skip to content
Snippets Groups Projects
Commit 9fee9be7 authored by Florian's avatar Florian
Browse files

transaction created_at and due_date

parent 5d5bde97
No related branches found
No related tags found
No related merge requests found
......@@ -4,18 +4,22 @@ class Transaction {
String title;
double amount;
Category category;
DateTime createdAt = DateTime.now();
DateTime dueDate;
Transaction({
required this.title,
required this.amount,
required this.category
required this.category,
required this.dueDate
});
factory Transaction.fromJson(Map<String, dynamic> parsedJson) {
return Transaction(
title: parsedJson['title'],
amount: parsedJson['amount'],
category: parsedJson['category']
category: parsedJson['category'],
dueDate: parsedJson['due_date']
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment