appbundle being generated with the empty String.fromEnvironment

308 views Asked by At

I'm storing some settings in String.fromEnvironment('CONFIG_EX'), when I run the app in Debug or Profile mode everything works normally, but now I launched it on the PlayStore in Open Test and it's returning a 403 error and I realized that the compilation generated the empty variables.

it's more or less like this in my run settings:

--dart-define=CONFIG_EX=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I'm generating my appbundle this way:

flutter build appbundle

Is there any way to generate this appbundle with the run settings?

1

There are 1 answers

0
yuralife On

You can extend build commands with extra parameters.

Android:

flutter build appbundle --dart-define=CONFIG_EX=xxx

iOS:

flutter build ios --dart-define=CONFIG_EX=xxx