-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from B3-3iL-DLW/feat/app-env-vars
Feat/app env vars
- Loading branch information
Showing
8 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DEV_API_URL= | ||
PROD_API_URL= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,8 @@ app.*.map.json | |
/android/app/release | ||
|
||
# FVM Version Cache | ||
.fvm/ | ||
.fvm/ | ||
|
||
# Env file | ||
/.env | ||
/.env.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import 'package:flutter_dotenv/flutter_dotenv.dart'; | ||
|
||
import 'config.dart'; | ||
|
||
class DevConfig extends Config { | ||
@override | ||
String get apiUrl => 'https://api-dev.lukasvalois.com'; | ||
String get apiUrl => dotenv.env['DEV_API_URL'] ?? 'http://localhost:8000'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import 'package:flutter_dotenv/flutter_dotenv.dart'; | ||
|
||
import 'config.dart'; | ||
|
||
class ProdConfig extends Config { | ||
@override | ||
String get apiUrl => 'https://api.lukasvalois.com'; | ||
String get apiUrl => dotenv.env['PROD_API_URL'] ?? 'http://localhost:8000'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters