This is a Flutter application for converting currencies using real-time exchange rates. The project is structured using the Clean Architecture pattern to ensure a scalable and maintainable codebase.
- Convert currencies using up-to-date exchange rates.
- Select from a wide range of currencies.
- Save selected currencies locally for quick access.
This project follows the Clean Architecture pattern, which divides the codebase into several layers:
- Presentation: Contains the UI code (Widgets) and the logic to handle user interactions.
- Domain: Contains the business logic. This includes use cases and entities.
- Data: Handles data retrieval from various sources (e.g., APIs, local storage). This layer includes repositories and data sources.
-
Presentation Layer:
- Widgets: Flutter widgets for UI.
- Bloc: Business Logic Component for state management.
-
Domain Layer:
- Entities: Basic data objects used across the application.
- Use Cases: Classes that contain the business logic.
-
Data Layer:
- Repositories: Interfaces for data handling.
- Data Sources: Implementations for data fetching (e.g., API calls, local storage).
To set up the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/Nilupul96/currency_converter.git cd currency_converter
-
Install Flutter:
If you haven't already, install Flutter by following the instructions on the official Flutter website.
- Get dependencies:
flutter pub get
- Add your API Key:
get Your API key from this web site--> https://app.freecurrencyapi.com
Then create .env file in your root project directory
API_KEY = YOUR_API_KEY add this line in .env file and replace your API Key
For more details--> https://pub.dev/packages/flutter_dotenv
Run on an emulator or connected device:
flutter run
Here are some of the key dependencies used in this project:
Currency converting API - https://app.freecurrencyapi.com