From 4851d4a40f1db767523aaefc7af9ec7bdf011d56 Mon Sep 17 00:00:00 2001 From: Moe Date: Thu, 12 May 2022 10:28:55 +0700 Subject: [PATCH] Sync cart with flutter_lints v2.0.1 --- lib/screens/cart.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/screens/cart.dart b/lib/screens/cart.dart index 9b8a700..88eac91 100644 --- a/lib/screens/cart.dart +++ b/lib/screens/cart.dart @@ -34,7 +34,7 @@ class _CartState extends State { }); } - Future _getTotal = getTotal(); + Future getTotal_ = getTotal(); return Scaffold( backgroundColor: const Color(0xff1b1c1e), @@ -62,28 +62,28 @@ class _CartState extends State { if (productData != null) { return CartBox( controller: true, - imageUrl: 'https://nekoya.moe.team/img/' + productData[0]['IMAGE'], + imageUrl: "https://nekoya.moe.team/img/${productData[0]['IMAGE']}", title: productData[0]['TITLE'], quantity: data[index]["quantity"], plus: () { addToCart(data[index]["product_id"]); setState(() { _viewCart = viewCart(); - _getTotal = getTotal(); + getTotal_ = getTotal(); }); }, minus: () { removeFromCart(data[index]["product_id"], false); setState(() { _viewCart = viewCart(); - _getTotal = getTotal(); + getTotal_ = getTotal(); }); }, remove: () { removeFromCart(data[index]["product_id"], true); setState(() { _viewCart = viewCart(); - _getTotal = getTotal(); + getTotal_ = getTotal(); }); } ); @@ -126,7 +126,7 @@ class _CartState extends State { ), ), floatingActionButton: FutureBuilder( - future: _getTotal, + future: getTotal_, builder: (context, snapshot) { if (snapshot.hasData) { var price = snapshot.data;