fix
This commit is contained in:
parent
70b798f65f
commit
543bdfcffb
2 changed files with 20 additions and 11 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue