Update animateToItem for new behavior of Future<void> in Dart 2 (#21446)

This commit is contained in:
Jason Simmons 2018-09-06 11:03:03 -07:00 committed by GitHub
parent 3519eabe8a
commit 992f266208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,7 +255,7 @@ class FixedExtentScrollController extends ScrollController {
@required Curve curve,
}) async {
if (!hasClients) {
return new Future<void>.value();
return;
}
final List<Future<void>> futures = <Future<void>>[];
@ -266,7 +266,7 @@ class FixedExtentScrollController extends ScrollController {
curve: curve,
));
}
return await Future.wait(futures);
await Future.wait(futures);
}
/// Changes which item index is centered in the controlled scroll view.