X-Git-Url: https://www.hackdaworld.org/gitweb/?a=blobdiff_plain;f=lib%2Fproduct_service.dart;h=218b16937ae027cfd302425ef52113aa03e984a5;hb=HEAD;hp=0ffe964b17c0038520314349e0d6ffa1b3077071;hpb=b2028ca4879e48884436ee0c2aee7fae6ddaeb5a;p=outofuni%2Ftavern2.git 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 })