{"id":18140773,"url":"https://github.com/amanullahgit/flutter-provider-state-management","last_synced_at":"2025-07-01T13:08:21.178Z","repository":{"id":259197581,"uuid":"876265311","full_name":"Amanullahgit/flutter-provider-state-management","owner":"Amanullahgit","description":"Flutter Provider State Management E-Commerce Application","archived":false,"fork":false,"pushed_at":"2024-10-22T05:36:51.000Z","size":270,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T17:51:48.593Z","etag":null,"topics":["flutter","flutter-provider","provider","provider-state-management"],"latest_commit_sha":null,"homepage":"https://youtu.be/qBWVYc6B_Cs","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Amanullahgit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-21T17:14:47.000Z","updated_at":"2025-02-05T02:25:43.000Z","dependencies_parsed_at":"2024-10-23T12:29:23.514Z","dependency_job_id":null,"html_url":"https://github.com/Amanullahgit/flutter-provider-state-management","commit_stats":null,"previous_names":["amanullahgit/flutter-provider-state-management"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Amanullahgit/flutter-provider-state-management","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amanullahgit%2Fflutter-provider-state-management","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amanullahgit%2Fflutter-provider-state-management/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amanullahgit%2Fflutter-provider-state-management/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amanullahgit%2Fflutter-provider-state-management/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Amanullahgit","download_url":"https://codeload.github.com/Amanullahgit/flutter-provider-state-management/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amanullahgit%2Fflutter-provider-state-management/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261021180,"owners_count":23098298,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flutter","flutter-provider","provider","provider-state-management"],"created_at":"2024-11-01T16:06:52.144Z","updated_at":"2025-06-20T21:37:12.138Z","avatar_url":"https://github.com/Amanullahgit.png","language":"C++","readme":"# 🛒 Flutter Provider State Management Example\n\nThis repository contains the source code for a **Flutter app** that demonstrates the use of the **Provider** package to manage state in a real-world scenario. The app is a simple product catalog where users can add items to a cart and view the cart's total value. The main focus of this project is to show how **Provider** can be used for **efficient state management** in Flutter applications.\n\n[![Watch on YouTube](https://img.youtube.com/vi/qBWVYc6B_Cs/0.jpg)](https://www.youtube.com/watch?v=qBWVYc6B_Cs)\n\n🔗 **[Watch the full tutorial on YouTube](https://www.youtube.com/watch?v=qBWVYc6B_Cs)**\n\n---\n\n## 🎯 Purpose of This Project\n\nThe primary goal of this project is to demonstrate **how to use the `Provider` package** in Flutter for managing global app state. It is designed to provide a real-world example rather than a fully functional app, focusing on practical use cases of `Provider` in Flutter.\n\n---\n\n## 🛠️ Features\n\n- Display a list of products.\n- Add products to a cart.\n- View the total price of items in the cart.\n- Efficient state management using `Provider`.\n\n---\n\n## 🏗️ Technologies \u0026 Packages\n\n- **Flutter**: For building the cross-platform app.\n- **Provider**: For state management.\n- **Dart**: Programming language for Flutter.\n\n---\n\n## 🏃 Getting Started\n\n### Prerequisites\n\nMake sure you have Flutter installed on your machine. You can follow the [official installation guide](https://flutter.dev/docs/get-started/install).\n\n### Installation\n\n1. Clone this repository:\n\n   ```bash\n   git clone https://github.com/Amanullahgit/flutter-provider-state-management.git\n   cd flutter-provider-state-management\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   flutter pub get\n   ```\n\n3. Run the app:\n\n   ```bash\n   flutter run\n   ```\n\n---\n\n## 📂 Project Structure\n\n```plaintext\nlib/\n├── models/\n│   ├── cart_item.dart        # Cart item model\n│   ├── product.dart          # Product model\n├── providers/\n│   ├── cart_provider.dart    # Manages cart state\n│   ├── product_provider.dart # Manages product list state\n├── screens/\n│   ├── cart_screen.dart      # Cart screen\n│   ├── product_screen.dart   # Product list screen\n├── main.dart                 # Entry point, MultiProvider setup\n```\n\n---\n\n## 🎬 Video Tutorial Overview\n\nIn the video tutorial, we cover:\n\n1. Introduction to the `Provider` package and its importance for state management.\n2. Building a product catalog where users can add items to the cart.\n3. Managing cart state and calculating the total price of items.\n4. Demonstrating how `Consumer` and `Provider.of` work to optimize widget rebuilding.\n5. Best practices for structuring your Flutter app using `Provider`.\n\n[Watch the full tutorial here](https://www.youtube.com/watch?v=VIDEO_ID).\n\n---\n\n## 🛠️ How It Works\n\n- **ProductProvider**: Manages the list of products available in the store (in this example, hardcoded).\n- **CartProvider**: Manages the cart's contents and calculates the total price of products. This state is shared globally using `ChangeNotifierProvider`.\n- **Consumer**: Used to rebuild specific parts of the UI when the cart state changes, optimizing performance by preventing unnecessary rebuilds.\n\n---\n\n\n## 🚀 Potential Enhancements\n\n- Add product details and images.\n- Implement user authentication.\n- Create a checkout flow and integrate a payment gateway (for a full e-commerce app).\n\n---\n\n## 🤝 Contributing\n\nFeel free to fork this repository and submit pull requests. If you encounter any issues or have suggestions for improvements, please open an issue.\n\n---\n\n\n### 🔗 Useful Links\n\n- [Flutter Documentation](https://flutter.dev/docs)\n- [Provider Package](https://pub.dev/packages/provider)\n\n---\n\nHappy coding! 😊\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famanullahgit%2Fflutter-provider-state-management","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famanullahgit%2Fflutter-provider-state-management","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famanullahgit%2Fflutter-provider-state-management/lists"}