This commit is contained in:
JMARyA 2024-09-25 22:29:29 +02:00
parent 70b798f65f
commit 543bdfcffb
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 20 additions and 11 deletions

View file

@ -38,7 +38,7 @@ class _SupplyPageState extends State<SupplyPage> {
availableVariants =
widget.onlyVariants ?? widget.item.variants.keys.toList();
variant = widget.item.variants.keys.first;
variant = availableVariants.first;
_selectedOrigin = widget.forceOrigin ?? "";
_priceController = TextEditingController(text: widget.forcePrice ?? "");
@ -310,6 +310,17 @@ class SupplyForm {
);
}
Map<String, dynamic> json() {
return {
"item": itemID,
"variant": variant,
"price": price,
"origin": origin,
"location": location,
"note": note
};
}
SupplyForm({
required this.itemID,
required this.variant,