File tree Expand file tree Collapse file tree 2 files changed +23
-9
lines changed Expand file tree Collapse file tree 2 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ platform :ios do
43
43
)
44
44
45
45
increment_build_number (
46
- build_number : ENV [ "$ GITHUB_RUN_NUMBER" ]
46
+ build_number : ENV [ "GITHUB_RUN_NUMBER" ]
47
47
)
48
48
49
49
build_app (
Original file line number Diff line number Diff line change @@ -27,16 +27,30 @@ class BaseEnv {
27
27
final String baseApiUrl;
28
28
}
29
29
30
+ // DO NOT USE String.fromEnvironment without 'const'!!!
31
+ // https://github.com/flutter/flutter/issues/55870#issuecomment-620776138
30
32
String get envLcdPort => const String .fromEnvironment ('LCD_PORT' , defaultValue: '1317' );
31
33
34
+ // DO NOT USE String.fromEnvironment without 'const'!!!
35
+ // https://github.com/flutter/flutter/issues/55870#issuecomment-620776138
32
36
String get envGrpcPort => const String .fromEnvironment ('GRPC_PORT' , defaultValue: '9090' );
33
37
34
- String get envLcdUrl => String .fromEnvironment (
35
- 'LCD_URL' ,
36
- defaultValue: Platform .isAndroid ? 'http://10.0.2.2' : 'http://localhost' ,
37
- );
38
+ String get envLcdUrl {
39
+ // DO NOT USE String.fromEnvironment without 'const'!!!
40
+ // https://github.com/flutter/flutter/issues/55870#issuecomment-620776138
41
+ const result = String .fromEnvironment ('LCD_URL' );
42
+ if (result.isEmpty) {
43
+ return Platform .isAndroid ? 'http://10.0.2.2' : 'http://localhost' ;
44
+ }
45
+ return result;
46
+ }
38
47
39
- String get envGrpcUrl => String .fromEnvironment (
40
- 'GRPC_URL' ,
41
- defaultValue: Platform .isAndroid ? 'http://10.0.2.2' : 'http://localhost' ,
42
- );
48
+ String get envGrpcUrl {
49
+ // DO NOT USE String.fromEnvironment without 'const'!!!
50
+ // https://github.com/flutter/flutter/issues/55870#issuecomment-620776138
51
+ const result = String .fromEnvironment ('GRPC_URL' );
52
+ if (result.isEmpty) {
53
+ return Platform .isAndroid ? 'http://10.0.2.2' : 'http://localhost' ;
54
+ }
55
+ return result;
56
+ }
You can’t perform that action at this time.
0 commit comments