OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 /// Functions go in this file as opposed to lib/src/utils.dart if they need to | 5 /// Functions go in this file as opposed to lib/src/utils.dart if they need to |
6 /// be accessible to the transformer-loading isolate. | 6 /// be accessible to the transformer-loading isolate. |
7 library pub.asset.utils; | 7 library pub.asset.utils; |
8 | 8 |
9 import 'dart:async'; | 9 import 'dart:async'; |
10 | 10 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 subscription = callback().listen(controller.add, | 77 subscription = callback().listen(controller.add, |
78 onError: controller.addError, | 78 onError: controller.addError, |
79 onDone: controller.close); | 79 onDone: controller.close); |
80 }, | 80 }, |
81 onCancel: () => subscription.cancel(), | 81 onCancel: () => subscription.cancel(), |
82 onPause: () => subscription.pause(), | 82 onPause: () => subscription.pause(), |
83 onResume: () => subscription.resume(), | 83 onResume: () => subscription.resume(), |
84 sync: true); | 84 sync: true); |
85 return controller.stream; | 85 return controller.stream; |
86 } | 86 } |
OLD | NEW |