A Flutter application that displays cities from around the world, with features for searching, viewing on a map, and managing search history.
Before you begin, ensure you have met the following requirements:
- Flutter 3.24.3
This project follows Clean Architecture principles, organized into three main layers:
- Data Layer: Handles external interactions (API calls, local storage)
- Domain Layer: Contains business logic and models
- Presentation Layer: Manages UI components and state
The project uses the BLoC pattern (specifically Cubit) for state management, providing a clean separation between UI and business logic.
The project is organized as follows:
lib/
├── core/
│ ├── constants/
│ ├── errors/
│ └── utils/
├── data/
│ ├── datasources/
│ │ ├── local/
│ │ └── remote/
│ └── repositories/
├── domain/
│ ├── models/
│ └── repositories/
├── presentation/
│ ├── cubits/
│ └── pages/
└── di/
- dio: For making HTTP requests.
- hive: For local data storage.
- get_it & injectable: For dependency injection.
- flutter_bloc: For state management.
- freezed: For generating immutable data classes and utility methods.
- flutter_map: For displaying maps.
- world_countries: For country flags.
To get a local copy up and running, follow these steps:
- Clone the repository:
git clone https://github.com/talhakerpicci/cities-of-the-world
cd cities-of-the-world
- Install dependencies:
flutter pub get
- Generate code:
flutter pub run build_runner build --delete-conflicting-outputs
- Run the app:
flutter run
For a full app walkthrough, check out the demo video below:
