June 2017
Intermediate to advanced
873 pages
18h 9m
English
Often the development and deployment environments are different. For example, the app has to connect to a different database or a different mail server in either environment to use a mocked service in development and the real service in production, or something like that. How can we use different setups in both modes, or achieve a kind of precompiler directive-like functionality?
Perform the following steps to use different settings:
pubspec.yaml with an environment line that specifies a map of the settings, names and values, as follows (see the code in dev_prod_settings):transformers: # or dev_transformers - $dart2js: environment: {PROD: ...
Read now
Unlock full access