X-Git-Url: https://hackdaworld.org/gitweb/?p=outofuni%2Ftavern2.git;a=blobdiff_plain;f=lib%2Fproduct_service.dart;fp=lib%2Fproduct_service.dart;h=218b16937ae027cfd302425ef52113aa03e984a5;hp=0ffe964b17c0038520314349e0d6ffa1b3077071;hb=74001e08303ce797811fc91816a67c2006fe0a25;hpb=b2028ca4879e48884436ee0c2aee7fae6ddaeb5a diff --git a/lib/product_service.dart b/lib/product_service.dart index 0ffe964..218b169 100644 --- a/lib/product_service.dart +++ b/lib/product_service.dart @@ -57,7 +57,7 @@ class ProductService { } } - Future createProduct(String name,double price,String cat) async { + Future createProduct(String name,double pri,String cat) async { try { var url=_server+'/'+_db; var response = await _http.post( @@ -65,7 +65,7 @@ class ProductService { headers: {'Content-Type': 'application/json'}, body: JSON.encode({ 'name': name, - 'price': price, + 'price': pri, 'type': 'product', 'category': cat })