This project demonstrates a clean and scalable Flutter architecture using:
- Clean Architecture
- Riverpod + StateNotifier
- GoRouter for navigation
- Dio with interceptors for networking
- Local token storage via SharedPreferences
- Splash screen with authentication check
- User list with pagination and avatar caching
| Feature | Status |
|---|---|
| Login with ReqRes API | ✅ |
| Persist token locally | ✅ |
| Auto login on app restart | ✅ |
| User list with pagination | ✅ |
| Cached profile images | ✅ |
| GoRouter clean navigation | ✅ |
| Splash transition animation | ✅ |
lib/
├─ core/
│ ├─ network/api_client.dart # Dio API Client
│ ├─ constants/app_const.dart
│ └─ di/providers.dart # Riverpod dependency graph
├─ features/
│ ├─ auth/
│ │ ├─ data/ # Remote & Local Sources
│ │ ├─ domain/ # Repository & Entities
│ │ └─ presentation/ # Login UI & Notifier
│ ├─ users/
│ │ ├─ data/
│ │ ├─ domain/
│ │ └─ presentation/
└─ router/
└─ app_router.dart
git clone <your_repo_url>
cd <project_folder>flutter pub getflutter run
- ReqRes.in API is used only for demo purpose
- This architecture is ready for future scaling & modularization
Feel free to fork, improve and submit PRs.