A modern Flutter application for managing products, featuring CSV uploads, real-time progress tracking, and filtering capabilities. Built with Clean Architecture to ensure scalability and testability.
- Flutter SDK (v3.0+)
- Dart SDK
- Android Studio / Xcode (for mobile emulation)
-
Navigate to the app directory:
cd app -
Install dependencies:
flutter pub get
-
Run the application:
flutter run
-
Run tests:
flutter test
The application follows Clean Architecture principles, dividing the codebase into three main layers: Domain, Data, and App (Presentation).
app/lib/
├── app/ # Presentation Layer (UI & State Management)
│ ├── pages/ # Screen widgets and their controllers (e.g., HomeView, HomeController)
│ ├── theme/ # App styling, colors, and text styles
│ └── widgets/ # Reusable UI components
├── data/ # Data Layer (Implementation)
│ └── repositories/ # Concrete implementations of domain repositories
│ └── errors/ # Error handling classes (Failure, ServerFailure, etc.)
├── domain/ # Domain Layer (Business Logic)
│ ├── entities/ # Pure Dart objects representing business entities
│ ├── repositories/ # Abstract interfaces for repositories
│ ├── services/ # Abstract interfaces for services (e.g., FilePicker)
│ └── usecases/ # Business logic units (e.g., GetProducts, UploadProducts)
│ └── errors/ # Error handling abstraction
├── injection.dart # Dependency Injection setup (GetIt)
└── main.dart # App entry point
- CSV Upload: Upload product data via CSV files with real-time progress tracking.
- Product Listing: View products in a responsive table layout.
- Filtering:
- Search by product name.
- Sort by Name, Price, or Expiration Date.
- Toggle sort direction (Ascending/Descending).
- Error Handling: Error management with user-friendly UI feedback for network and server issues.
- Clean UI: Modern, gradient-based design with responsive components.
- Framework: Flutter
- State Management:
ValueNotifier/ChangeNotifier - Dependency Injection:
get_it - Networking:
dio - Testing:
flutter_test,mockito