basic csv loader, transaction list & half done stats page

This commit is contained in:
2024-02-04 22:34:28 +01:00
commit 3abee9ff6f
179 changed files with 6999 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import 'dart:convert';
import 'transaction.dart';
class Account {
List<Transaction> transactions;
Account({
this.transactions = const [],
});
factory Account.fromJson(Map<String, dynamic> json) {
return Account(
transactions: (jsonDecode(json['transactions']) as List<dynamic>).map((transaction) => Transaction.fromJson(transaction)).toList(),
);
}
Map<String, String> toJson() => {
'transactions': jsonEncode(transactions.map((transaction) => transaction.toJson()).toList()),
};
}