Refactor ForexRateAPI integration to load API key from .env file and enhance error handling
Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -23,10 +23,10 @@ Simple Flutter app to track US rental income and convert to SEK for Swedish tax
|
||||
|
||||
## Setup
|
||||
|
||||
1. Set your FX API app key in `lib/state/rent_controller.dart`:
|
||||
1. Create `.env` in the project root with your FX API key:
|
||||
|
||||
```dart
|
||||
const String forexRateApiKey = 'REPLACE_WITH_YOUR_FOREXRATE_API_KEY';
|
||||
```env
|
||||
EXCHANGE_RATE_API_KEY=REPLACE_WITH_YOUR_EXCHANGE_RATE_API_KEY
|
||||
```
|
||||
|
||||
1. Install dependencies:
|
||||
|
||||
Reference in New Issue
Block a user