A Flutter-based shopping cart app that fetches product data from an API and allows users to add, update, and remove items from their cart. It uses Riverpod for state management to handle the cart's state and calculate discounts.
- Product Display: Displays a list of products fetched from an API.
- Add to Cart: Users can add products to the shopping cart.
- Increase/Decrease Quantity: Users can increase or decrease the quantity of each product in the cart.
- Price and Discount: The original price of a product is shown with a strikethrough, and the discounted price is displayed next to it.
- Shopping Cart: The cart page shows all the products added, their quantities, and the total price.
- Badge on Cart Icon: The cart icon shows the number of items in the cart.
- Flutter 3.22.1
- Dart 3.4.1 • DevTools 2.34.3
Clone this repository to your local machine:
git clone https://github.com/yourusername/flutter-shopping-cart.git
Navigate to the project directory and run the following command to install the required dependencies:
flutter pub get
Once the dependencies are installed, you can run the app on your emulator or physical device:
flutter run