feat: add remote products and qr code for payconic
This commit is contained in:
@@ -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?,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user