| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart.core; | 5 part of dart.core; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * The reserved words [:true:] and [:false:] denote objects that are the only | 8 * The reserved words [:true:] and [:false:] denote objects that are the only |
| 9 * instances of this class. | 9 * instances of this class. |
| 10 * | 10 * |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 * Example: | 32 * Example: |
| 33 * | 33 * |
| 34 * const loggingFlag = const bool.fromEnvironment("logging"); | 34 * const loggingFlag = const bool.fromEnvironment("logging"); |
| 35 * | 35 * |
| 36 * If you want to use a different truth-string than `"true"`, you can use the | 36 * If you want to use a different truth-string than `"true"`, you can use the |
| 37 * [String.fromEnvironment] constructor directly: | 37 * [String.fromEnvironment] constructor directly: |
| 38 * | 38 * |
| 39 * const isLoggingOn = (const String.fromEnvironment("logging") == "on"); | 39 * const isLoggingOn = (const String.fromEnvironment("logging") == "on"); |
| 40 */ | 40 */ |
| 41 external const factory bool.fromEnvironment(String name, | 41 external const factory bool.fromEnvironment(String name, |
| 42 {bool defaultValue: false}); | 42 {bool defaultValue: false}); |
| 43 | 43 |
| 44 external int get hashCode; | 44 external int get hashCode; |
| 45 | 45 |
| 46 /** | 46 /** |
| 47 * Returns [:"true":] if the receiver is [:true:], or [:"false":] if the | 47 * Returns [:"true":] if the receiver is [:true:], or [:"false":] if the |
| 48 * receiver is [:false:]. | 48 * receiver is [:false:]. |
| 49 */ | 49 */ |
| 50 String toString() { | 50 String toString() { |
| 51 return this ? "true" : "false"; | 51 return this ? "true" : "false"; |
| 52 } | 52 } |
| 53 } | 53 } |
| OLD | NEW |