Update app top cater for env variables
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user