mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Update animateToItem for new behavior of Future<void> in Dart 2 (#21446)
This commit is contained in:
parent
3519eabe8a
commit
992f266208
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user