OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'dart:async'; | 4 import 'dart:async'; |
5 | 5 |
6 Future<String> asyncString() async { | 6 Future<String> asyncString() async { |
7 return "foo"; | 7 return "foo"; |
8 } | 8 } |
9 | 9 |
10 Future<String> asyncString2() async { | 10 Future<String> asyncString2() async { |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 Stream<String> asyncStarString2() async* { | 30 Stream<String> asyncStarString2() async* { |
31 yield "bar"; | 31 yield "bar"; |
32 } | 32 } |
33 | 33 |
34 List<String> stringList = ["bar"]; | 34 List<String> stringList = ["bar"]; |
35 | 35 |
36 main() async { | 36 main() async { |
37 String str = await asyncString(); | 37 String str = await asyncString(); |
38 } | 38 } |
OLD | NEW |