feat: add remote products and qr code for payconic

This commit is contained in:
2026-10-22 00:10:26 +02:00
parent b15d94a805
commit 71af6f9ffe
31 changed files with 2053 additions and 179 deletions
+5
View File
@@ -170,6 +170,9 @@ class ServerProduct {
/// Deleted on the website: hidden, kept for open tabs and the history.
final bool archived;
/// The picture, at `/images/<imageId>`; null: none.
final String? imageId;
const ServerProduct({
required this.id,
required this.name,
@@ -177,6 +180,7 @@ class ServerProduct {
required this.priceInCents,
this.lowStockThreshold,
this.archived = false,
this.imageId,
});
factory ServerProduct.fromJson(Map<String, dynamic> json) {
@@ -187,6 +191,7 @@ class ServerProduct {
priceInCents: json['priceInCents'] as int,
lowStockThreshold: json['lowStockThreshold'] as int?,
archived: json['archived'] as bool? ?? false,
imageId: json['imageId'] as String?,
);
}
}