flutter_cart
a flutter package for make your life easy. this package is used for maintaining a cart.
usage
it is recommended to use any state management. i.e:- provider, redux etc
to use this plugin, add flutter_cart
as a dependency in your pubspec.yaml file.
getting started
- first create an instance of flutter cart package.
var cart = fluttercart();
- after getting the instance, we are able to get the built-in methods
- add items into cart
cart.addtocart( {@required dynamic productid, @required dynamic unitprice, @required int quantity, dynamic uniquecheck, dynamic productdetailsobject});
- remove item one by one from cart ➖
cart.decrementitemfromcart(index);
- add item one by one to cart ➕
cart.incrementitemtocart(index);
- get the total amount
cart.gettotalamount()
- get the total quantity
cart.getcartitemcount()
- get specific item from cart
cart.getspecificitemfromcart(cartid)
- add items into cart
Comments are closed.