Skip to content

azatech/dart_define_example

Repository files navigation

dart_define_example

A new Flutter project.

Getting Started

Run and define your:

  • API_KEY_ID string value
  • SOME_CONDITIONS_PATH string value
  • IS_STAGE bool value
  • IS_PROD bool value

You have 2 options to run:

First

flutter run --dart-define=API_KEY_ID=SOME_KEY --dart-define=SOME_CONDITIONS_PATH=/_path --dart-define=IS_STAGE=true --dart-define=IS_PROD=false

Second

--dart-define-from-file=keys_production.json or --dart-define-from-file=keys_staging.json

Useful links:

TODO

  1. Configure CI/CD pipeline with dart define command and not show-off the API keys

P.S.

  1. Add to .gitignore all json files with sensitive API_KEYS
  2. Always remember to obfuscate code with sensitive API_KEYS

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published