Refactor environment variable handling and update build instructions

- Introduced a Makefile for building the release APK with `make build release`.
- Updated README to reflect new build command and usage of `--dart-define-from-file=.env`.
- Removed dotenv dependency and switched to using Dart's `--dart-define` for API key management.
- Adjusted ForexRateAPI key loading logic to improve error handling and clarity.

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-20 09:55:07 +01:00
parent 529d4eaa3f
commit 2e703c6722
7 changed files with 77 additions and 14 deletions
-2
View File
@@ -1,12 +1,10 @@
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:provider/provider.dart';
import 'package:rental_income_tracker/screens/home_screen.dart';
import 'package:rental_income_tracker/state/rent_controller.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await dotenv.load(fileName: '.env');
runApp(const RentalIncomeTrackerApp());
}