configurationDependent function

String configurationDependent(
  1. String envName,
  2. String value
)

Generates code that will evaluate to the empty string if const bool.fromEnvironment(envName) is true and evaluate to value otherwise.

Implementation

String configurationDependent(String envName, String value) {
  return 'const $coreImportPrefix.bool.fromEnvironment(${quoted(envName)})'
      ' ? \'\' '
      ': $value';
}