A modern e-commerce mobile application built with Flutter, featuring a clean UI design and state management using BLoC pattern.
- Browse products in a visually appealing grid layout
- Search products by name and category
- Sort products by price, name, and popularity
- View detailed product information
- Category-based filtering
- Add/remove products to cart
- Adjust product quantities
- Swipe to remove items
- View cart subtotal and total
- Clear cart functionality
- Undo remove actions
- Persistent cart data
- Modern, clean design
- Smooth animations and transitions
- Responsive layout
- Empty state handling
- Loading state indicators
- Error state handling
- Pull-to-refresh functionality
- Dark/Light theme support
- BLoC pattern implementation
- Stream-based reactive programming
- Efficient data flow
- Persistent storage integration
- Flutter SDK (Version 3.0 or higher)
- Dart SDK (Version 2.17 or higher)
- Android Studio / VS Code
- Android SDK / Xcode (for iOS development)
- Clone the repository
git clone https://github.com/yourusername/FlutterBLoC.git- Navigate to project directory
cd FlutterBLoC- Install dependencies
flutter pub get- Run the app
flutter runlib/
├── blocs/
│ ├── cart_bloc.dart
│ └── product_bloc.dart
├── data/
│ ├── cart_service.dart
│ └── product_service.dart
├── models/
│ ├── cart.dart
│ └── product.dart
├── screens/
│ ├── product_list.dart
│ └── cart_screen.dart
├── widgets/
│ ├── cart_widgets.dart
│ └── product_widgets.dart
└── main.dart
void addToCart(Product product) {
cartBloc.addToCart(Cart(product, 1));
}void removeFromCart(Cart cart) {
cartBloc.removeFromCart(cart);
}dependencies:
flutter:
sdk: flutter
flutter_bloc: ^8.1.3
equatable: ^2.0.5
shared_preferences: ^2.2.2- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
The app uses the BLoC (Business Logic Component) pattern for state management. This provides:
- Separation of concerns
- Testable business logic
- Reactive state updates
- Easy state debugging
The shopping cart features:
- Real-time total calculation
- Quantity adjustment
- Persistent storage
- Undo functionality
- Clear all option
- Swipe to delete items
- Pull to refresh
- Smooth animations
- Loading indicators
- Error handling
- Empty state displays
- User authentication
- Payment integration
- Order history
- Wishlist functionality
- Push notifications
- Product reviews and ratings
- Social sharing
- Address management
- Multiple language support
- Efficient list rendering
- Image caching
- Lazy loading
- State management optimization
- Memory management
This project is licensed under the MIT License - see the LICENSE.md file for details
- Flutter team for the amazing framework
- BLoC library contributors
- The Flutter community for their support and feedback
Rezwanullah Khan Quraishi - linkedin
Project Link: GitHub





