Unverified Commit 992f2662 authored by Jason Simmons's avatar Jason Simmons Committed by GitHub

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

parent 3519eabe
...@@ -255,7 +255,7 @@ class FixedExtentScrollController extends ScrollController { ...@@ -255,7 +255,7 @@ class FixedExtentScrollController extends ScrollController {
@required Curve curve, @required Curve curve,
}) async { }) async {
if (!hasClients) { if (!hasClients) {
return new Future<void>.value(); return;
} }
final List<Future<void>> futures = <Future<void>>[]; final List<Future<void>> futures = <Future<void>>[];
...@@ -266,7 +266,7 @@ class FixedExtentScrollController extends ScrollController { ...@@ -266,7 +266,7 @@ class FixedExtentScrollController extends ScrollController {
curve: curve, curve: curve,
)); ));
} }
return await Future.wait(futures); await Future.wait(futures);
} }
/// Changes which item index is centered in the controlled scroll view. /// Changes which item index is centered in the controlled scroll view.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment