add location on card

This commit is contained in:
JMARyA 2024-09-23 08:42:58 +02:00
parent a1ac1ff893
commit f30ce56140
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 8 additions and 0 deletions

View file

@ -357,6 +357,7 @@ class Transaction {
late ConsumeInfo? consumed; late ConsumeInfo? consumed;
late bool expired; late bool expired;
late String? note; late String? note;
late String? location;
Transaction(Map<String, dynamic> json) { Transaction(Map<String, dynamic> json) {
uuid = json["uuid"]; uuid = json["uuid"];
@ -368,6 +369,7 @@ class Transaction {
expired = json["expired"]; expired = json["expired"];
note = json["note"]; note = json["note"];
consumed = json["consumed"] != null ? ConsumeInfo(json["consumed"]) : null; consumed = json["consumed"] != null ? ConsumeInfo(json["consumed"]) : null;
location = json["location"];
} }
} }

View file

@ -97,6 +97,12 @@ class TransactionCard extends StatelessWidget {
const SizedBox(height: 8), const SizedBox(height: 8),
IconText(Icons.store, t.origin!, color: Colors.blue) IconText(Icons.store, t.origin!, color: Colors.blue)
], ],
if (t.location != null) ...[
const SizedBox(
height: 8,
),
IconText(Icons.location_city, t.location!)
]
], ],
), ),
), ),