| Index: editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/theme/preferences/DartSample.dart
|
| diff --git a/editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/theme/preferences/DartSample.dart b/editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/theme/preferences/DartSample.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..dee8034a50c0735d481d69e177ec56537ecb34df
|
| --- /dev/null
|
| +++ b/editor/tools/plugins/com.google.dart.tools.deploy/src/com/google/dart/tools/ui/theme/preferences/DartSample.dart
|
| @@ -0,0 +1,36 @@
|
| +import "package:meta/lib/meta.dart";
|
| +
|
| +final xs = [1, 2, 3, 4, 5];
|
| +const howMany = 3;
|
| +
|
| +void main() {
|
| + new Sample().printXs(howMany);
|
| +}
|
| +
|
| +class Sample extends Object {
|
| + static double _zval = 0.3;
|
| + static func() => print('callback');
|
| + final Map mapa = { 'a' : func };
|
| + double get zfetcher => _zval;
|
| + set zsetter(x) => _zval = x;
|
| +
|
| + /** Print some xs. */
|
| + void printXs(int limit) {
|
| + var other;
|
| + for (int i = 0; i < (limit > xs.length ? xs.length : limit); i++) {
|
| + if (identical(this, other)) print(xs[i]); // Print the indexed xs.
|
| + }
|
| + var msg = oldMethod(zsetter = zfetcher);
|
| + print(msg);
|
| + }
|
| +
|
| + /* Old code. */
|
| + @deprecated String oldMethod(var qk) {
|
| + String rs = r'string';
|
| + String ls = """
|
| +long string
|
| +""";
|
| + String x = "prefix $rs${ls.substring(3, qk)} suffix";
|
| + return x;
|
| + }
|
| +}
|
|
|