Skip to content
Discussion options

You must be logged in to vote

I have resolved the problem with the following set-up.

environment variables:
APP_CONFIG={"CLOUDFLARE_API_KEY": xxxxx}

pre-build scripts:

Create directory if it doesn't exist

mkdir -p $CM_BUILD_DIR/config

Write out the environment variable as a json file

echo $APP_CONFIG > $CM_BUILD_DIR/config/prod.json

build command flags:
--dart-define-from-file config/prod.json

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by isaac-gofa
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants