From 6904bc13d1ef17109c951517955f1e69c3903c62 Mon Sep 17 00:00:00 2001 From: Hector Aguero <31939754+hectorAguero@users.noreply.github.com> Date: Thu, 9 May 2024 18:28:54 -0400 Subject: [PATCH] change some configs about the package dotenv (#5) * change some configs about the package dotenv * Fix pubspec --- .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..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'