Update app top cater for env variables
This commit is contained in:
parent
1c7db86571
commit
4923f0f426
15 changed files with 42 additions and 50 deletions
5
Frontend/patient_manager/lib/env/env.dart
vendored
5
Frontend/patient_manager/lib/env/env.dart
vendored
|
|
@ -2,6 +2,7 @@ enum Enviroment { dev, prod }
|
|||
|
||||
abstract class AppEnviroment {
|
||||
static late String baseApiUrl;
|
||||
static late String baseFileUrl;
|
||||
static late Enviroment _enviroment;
|
||||
static Enviroment get enviroment => _enviroment;
|
||||
static setupEnv(Enviroment env) {
|
||||
|
|
@ -9,12 +10,14 @@ abstract class AppEnviroment {
|
|||
switch (env) {
|
||||
case Enviroment.dev:
|
||||
{
|
||||
baseApiUrl = "http://localhost";
|
||||
baseApiUrl = "http://localhost:80";
|
||||
baseFileUrl = "http://localhost:9000";
|
||||
break;
|
||||
}
|
||||
case Enviroment.prod:
|
||||
{
|
||||
baseApiUrl = "api";
|
||||
baseFileUrl = "minio";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue