0

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:

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.

artex
  • 3
  • 1

1 Answers1

0

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
Code on the Rocks
  • 11,488
  • 3
  • 53
  • 61
  • Thank you for your response, it works! But do you know how to set up dart define from file for ios build in xcode? – artex Jul 31 '23 at 11:23