This project showcases Clean Architecture in Flutter, utilizing the MVVM design pattern.
It uses Unspash API to show a list of images in a tiled format. The home page have a search bar that the user can type into to search for images. Search results are presented using paging and infinite scroll. Tapping an image navigates to a detail screen showing image details.
- Clean Architecture
- HTTP client to API REST (Dio)
- Internationalization translations (Easy localization)
- Routing (Go Router)
- MVVM pattern with Cubit for state management
- Dependency injection (Get it and Injectable).
- Environment configuration (dev, prod)
- Paged server requests (Infinite Scroll Pagination)
- Testing (flutter_test, Mockito)
The application has two environments and each one has its own configuration file:
- dev:
.env/dev.json
- prod:
.env/prod.json
Inside each one, you can find sensitive information that shouldn't be committed to this repository. However, I have included it to provide an easy way to launch this project. Please, replace the API key with your own Unsplash API key.
To run the application in each environment, you can use the following commands:
- dev:
flutter run --dart-define-from-file=.env/dev.json
- prod:
flutter run --dart-define-from-file=.env/prod.json
Also, you can configure your IDE to run the application in each environment.