Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gadget Shop by Supr3m

Application e-commerce Flutter de démonstration construite avec une architecture en couches et Riverpod.

Fonctionnalités

  • Catalogue produits : liste + détail
  • Panier : ajout, suppression, modification des quantités
  • Favoris persistés localement avec shared_preferences
  • Recherche, filtrage par catégorie et tri par prix/nom
  • Profil utilisateur mock
  • Gestion loading / error / data avec AsyncValue
  • Bonus : animation d'ajout au panier

Architecture

lib/
├── main.dart
├── core/
│   └── theme/
│       └── app_theme.dart
├── data/
│   ├── models/
│   │   ├── cart_item.dart
│   │   └── product.dart
│   ├── repositories/
│   │   └── product_repository.dart
│   └── services/
│       └── favorites_storage.dart
├── domain/
│   └── user_profile.dart
├── providers/
│   └── app_providers.dart
└── presentation/
    ├── screens/
    │   ├── home_screen.dart
    │   ├── product_detail_screen.dart
    │   ├── cart_screen.dart
    │   ├── favorites_screen.dart
    │   └── profile_screen.dart
    └── widgets/
        ├── product_card.dart
        └── quantity_stepper.dart

Providers

Le projet contient notamment :

  1. productsProvider — FutureProvider
  2. cartProvider — StateNotifierProvider
  3. favoritesProvider — StateNotifierProvider
  4. filterProvider — StateNotifierProvider
  5. filteredProductsProvider — Provider
  6. productByIdProvider — Provider.family
  7. profileProvider — Provider

Avec Riverpod 3, StateNotifierProvider est conservé dans l'API legacy. Le projet utilise donc package:flutter_riverpod/legacy.dart pour les providers concernés.

Lancer

flutter pub get
flutter run

Le catalogue est chargé depuis assets/products.json, donc aucune API externe n'est nécessaire.

About

application e-commerce pour la vente de gadget informatique

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages