diff --git a/lib/api.dart b/lib/api.dart index ea6f3dc..43cc0ad 100644 --- a/lib/api.dart +++ b/lib/api.dart @@ -357,6 +357,7 @@ class Transaction { late ConsumeInfo? consumed; late bool expired; late String? note; + late String? location; Transaction(Map json) { uuid = json["uuid"]; @@ -368,6 +369,7 @@ class Transaction { expired = json["expired"]; note = json["note"]; consumed = json["consumed"] != null ? ConsumeInfo(json["consumed"]) : null; + location = json["location"]; } } diff --git a/lib/pages/transaction.dart b/lib/pages/transaction.dart index c48d758..cd21a11 100644 --- a/lib/pages/transaction.dart +++ b/lib/pages/transaction.dart @@ -97,6 +97,12 @@ class TransactionCard extends StatelessWidget { const SizedBox(height: 8), IconText(Icons.store, t.origin!, color: Colors.blue) ], + if (t.location != null) ...[ + const SizedBox( + height: 8, + ), + IconText(Icons.location_city, t.location!) + ] ], ), ),