patrol
patrol copied to clipboard
Describe how to use `--dart-define-from-file`
Describe how to use --dart-define-from-file and add info how to use patrol.env in custom location using this option.
Does simple --dart-define works for you?
Yes --dart-define should work. If you have some trouble with using Patrol, join our discord (https://discord.gg/ukBK5t4EZg) and create new thread in #help-needed
@pdenert
in my case I use
abstract class EnvProps {
static const _myEnvVar = String.fromEnvironment("myEnvVar");
....
}
--dart-define-from-file=".env.json" and basically my file:
{ "myEnvVar":"someSecretValue" }
this is useful for passing apiUrl, some secret tokens that are being used for the build of the app itself