Skip to content

Scienticious/flutter_cart

 
 

Repository files navigation

Flutter_Cart 🛒

pub package

A flutter package for make your life easy. This package is used for maintaining a cart.

sample

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)
      

About

Flutter package for the cart management

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 98.2%
  • Swift 1.3%
  • Other 0.5%