Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Google Play Store does not see dart define variable

I have a silly question about dart define and Google Play Store configuration. After upload the version of the app variables from dart define from file does not work at all. What should I do make it run?

I have config.json file with keys. I’ve changed launch.json file in vs code adding:

 "args": [
                "--flavor",
                "prod",
                "-t",
                "lib/main_prod.dart",
                "--dart-define-from-file",
                "config.json"
            ],

I am building abb with:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

fvm flutter build appbundle --release --flavor prod -t lib/main_prod.dart

and when I upload version into Google Play Store it does not work at all.

>Solution :

You need to specify the dart-define config file in your build command:

fvm flutter build appbundle --release --flavor prod -t lib/main_prod.dart --dart-define-from-file config.json
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading