| 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 library cancelable_future; | 5 library analyzer.src.cancelable_future; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Type of callback called when the future returned by a CancelableCompleter | 10 * Type of callback called when the future returned by a CancelableCompleter |
| 11 * is canceled. | 11 * is canceled. |
| 12 */ | 12 */ |
| 13 typedef void CancelHandler(); | 13 typedef void CancelHandler(); |
| 14 | 14 |
| 15 /** | 15 /** |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 Future then(onValue(value), {Function onError}) => | 291 Future then(onValue(value), {Function onError}) => |
| 292 _future.then(onValue, onError: onError); | 292 _future.then(onValue, onError: onError); |
| 293 | 293 |
| 294 @override | 294 @override |
| 295 Future timeout(Duration timeLimit, {onTimeout()}) => | 295 Future timeout(Duration timeLimit, {onTimeout()}) => |
| 296 _future.timeout(timeLimit, onTimeout: onTimeout); | 296 _future.timeout(timeLimit, onTimeout: onTimeout); |
| 297 | 297 |
| 298 @override | 298 @override |
| 299 Future<T> whenComplete(action()) => _future.whenComplete(action); | 299 Future<T> whenComplete(action()) => _future.whenComplete(action); |
| 300 } | 300 } |
| OLD | NEW |