fix
This commit is contained in:
parent
7ee1cda550
commit
e366960ce7
2 changed files with 3 additions and 3 deletions
|
@ -201,7 +201,7 @@ class API {
|
|||
|
||||
// /demand
|
||||
Future<void> consumeItem(
|
||||
String transaction, String destination, String price) async {
|
||||
String transaction, String destination, double price) async {
|
||||
await postRequest("$instance/demand",
|
||||
{"uuid": transaction, "destination": destination, "price": price});
|
||||
}
|
||||
|
|
|
@ -27,8 +27,8 @@ class _ConsumePageState extends State<ConsumePage> {
|
|||
_formKey.currentState!.save();
|
||||
|
||||
API()
|
||||
.consumeItem(
|
||||
widget.transaction.uuid, _selectedDestination, "$_price €")
|
||||
.consumeItem(widget.transaction.uuid, _selectedDestination,
|
||||
double.parse(_price))
|
||||
.then((_) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text('Item consumed successfully!')),
|
||||
|
|
Loading…
Add table
Reference in a new issue