Index: lib/src/asset/asset_node.dart |
diff --git a/lib/src/asset/asset_node.dart b/lib/src/asset/asset_node.dart |
index 45d1b1771c215f165a2e3c001afb4a7ee5715e00..bab955fa21f613a15a4f520896a7c00a1a3ca55d 100644 |
--- a/lib/src/asset/asset_node.dart |
+++ b/lib/src/asset/asset_node.dart |
@@ -8,7 +8,6 @@ import 'dart:async'; |
import '../errors.dart'; |
import '../graph/transform_node.dart'; |
-import '../utils.dart'; |
import 'asset.dart'; |
import 'asset_id.dart'; |
@@ -115,9 +114,9 @@ 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 _waitForState(bool test(AssetState state), |
- callback(AssetState state)) { |
- if (test(state)) return syncFuture(() => callback(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)); |
} |