From 86f8e2812e55ea191b64f8de45eb1bcd856ff671 Mon Sep 17 00:00:00 2001 From: hectorAguero Date: Thu, 9 May 2024 18:20:00 -0400 Subject: [PATCH 1/2] change some configs about the package dotenv --- .github/workflows/test.yml | 2 +- .github/workflows/web.yml | 2 +- .gitignore | 1 + lib/main.dart | 2 +- pubspec.yaml | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 39f9004..467e871 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,6 +18,6 @@ jobs: cache: true # Not needed for tests but pubspec.yaml requires it - name: Make envfile - run: echo "API_URL=${{ vars.API_URL }}" > .env + run: echo "API_URL=${{ vars.API_URL }}" > dotenv - run: flutter test \ No newline at end of file diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml index 4224c78..285c67b 100644 --- a/.github/workflows/web.yml +++ b/.github/workflows/web.yml @@ -20,7 +20,7 @@ jobs: cache: true - name: Make envfile - run: echo "API_URL=${{ vars.API_URL }}" > .env + run: echo "API_URL=${{ vars.API_URL }}" > dotenv - name: Install dependencies run: flutter pub get diff --git a/.gitignore b/.gitignore index 8b8fca1..5987186 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,4 @@ app.*.map.json /android/app/release .env* +dotenv diff --git a/lib/main.dart b/lib/main.dart index fbeded3..527072c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -17,7 +17,7 @@ import 'theme/theme_mode_controller.dart'; Future main() async { usePathUrlStrategy(); - await dotenv.load(); + await dotenv.load(fileName: 'dotenv'); runApp(const ProviderScope(child: MainApp())); } diff --git a/pubspec.yaml b/pubspec.yaml index 6e3a839..c467b53 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -72,7 +72,7 @@ flutter: assets: # Add assets from the images directory to the application. - assets/ - - .env + - env icons_launcher: image_path: 'assets/ic_logo_border.png' From f051dc4bdd5dbf9e4c0749fe00e3d07694086c45 Mon Sep 17 00:00:00 2001 From: hectorAguero Date: Thu, 9 May 2024 18:26:59 -0400 Subject: [PATCH 2/2] Fix pubspec --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index c467b53..6138726 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -72,7 +72,7 @@ flutter: assets: # Add assets from the images directory to the application. - assets/ - - env + - dotenv icons_launcher: image_path: 'assets/ic_logo_border.png'