Chromium Code Reviews| Index: sdk/lib/core/bool.dart |
| diff --git a/sdk/lib/core/bool.dart b/sdk/lib/core/bool.dart |
| index 8150219d02a0105fd468df416c26bd283d5025b3..d1f31d760f68caad1467b29d32cf0541f543298f 100644 |
| --- a/sdk/lib/core/bool.dart |
| +++ b/sdk/lib/core/bool.dart |
| @@ -21,11 +21,19 @@ class bool { |
| * In all other cases, including when there is no declaration for `name`, |
| * the result is the [defaultValue]. |
| * |
| + * The result is the same as would be returned by: |
| + * |
| + * (const String.fromEnvironment(name) == "true") |
| + * ? true |
| + * : (const String.fromEnvironment(name) == "false") |
| + * ? false |
| + * : defaultValue |
| + * |
| * Example: |
| * |
| * const loggingFlag = const bool.fromEnvironment("logging"); |
| * |
| - * If you want to use a different truth-string, you can use the |
| + * If you want to use a different truth-string than `"true"`, you can use the |
|
floitsch
2015/09/22 09:36:46
no need to codify the "true".
Lasse Reichstein Nielsen
2015/09/22 10:28:09
It's intended as code, so I prefer it codified.
|
| * [String.fromEnvironment] constructor directly: |
| * |
| * const isLoggingOn = (const String.fromEnvironment("logging") == "on"); |