Index: lib/src/asset/asset_node.dart |
diff --git a/lib/src/asset/asset_node.dart b/lib/src/asset/asset_node.dart |
index 4924bbf21bd907a1579964ddbe60c14c0e29285a..629599c06ed7e6112f6aa52b4e8ee56fab10b5ce 100644 |
--- a/lib/src/asset/asset_node.dart |
+++ b/lib/src/asset/asset_node.dart |
@@ -83,7 +83,7 @@ class AssetNode { |
/// The return value of [callback] is piped to the returned Future. If the |
/// asset is removed before becoming available, the returned future will throw |
/// an [AssetNotFoundException]. |
- Future/*<T>*/ whenAvailable/*<T>*/(/*=T*/ callback(Asset asset)) { |
+ Future<T> whenAvailable<T>(T callback(Asset asset)) { |
return _waitForState((state) => state.isAvailable || state.isRemoved, |
(state) { |
if (state.isRemoved) throw new AssetNotFoundException(id); |
@@ -114,9 +114,8 @@ class AssetNode { |
/// [callback] is called synchronously if this is already in such a state. |
/// |
/// The return value of [callback] is piped to the returned Future. |
- Future/*<T>*/ _waitForState/*<T>*/( |
- bool test(AssetState state), |
- /*=T*/ callback(AssetState state)) { |
+ Future<T> _waitForState<T>( |
+ bool test(AssetState state), T callback(AssetState state)) { |
if (test(state)) return new Future.sync(() => callback(state)); |
return onStateChange.firstWhere(test).then((_) => callback(state)); |
} |