Skip to content

Commit 7047fdd

Browse files
committed
feat: and env string tool
1 parent 66425ea commit 7047fdd

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

lib/config/env.dart

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,30 @@ abstract class Env {
2828
static bool get isLocal => environment == kEnvironment.local;
2929

3030

31+
static String get idLocalBecomesDev
32+
{
33+
return switch (environment)
34+
{
35+
kEnvironment.prod => 'prod',
36+
kEnvironment.stage => 'stage',
37+
kEnvironment.dev => 'dev',
38+
kEnvironment.local => 'dev',
39+
};
40+
}
41+
42+
43+
static String get id
44+
{
45+
return switch (environment)
46+
{
47+
kEnvironment.prod => 'prod',
48+
kEnvironment.stage => 'stage',
49+
kEnvironment.dev => 'dev',
50+
kEnvironment.local => 'local',
51+
};
52+
}
53+
54+
3155
static String chooseString({
3256
required String prod,
3357
required String stage,

0 commit comments

Comments
 (0)