@@ -950,9 +950,7 @@ void main() {
950
950
goTo (.5 );
951
951
await tester.pumpAndSettle ();
952
952
goTo (0 );
953
- // The animation was cut short by half, there should have been on less pumps
954
- final int truncatedPumpCount = shouldAnimate ? expectedPumpCount - 1 : expectedPumpCount;
955
- expect (await tester.pumpAndSettle (), truncatedPumpCount);
953
+ expect (await tester.pumpAndSettle (), expectedPumpCount);
956
954
expect (
957
955
tester.getSize (find.byKey (containerKey)).height / screenHeight,
958
956
closeTo (.25 , precisionErrorTolerance),
@@ -1007,6 +1005,29 @@ void main() {
1007
1005
);
1008
1006
});
1009
1007
1008
+ testWidgets ('Can animateTo with a Curves.easeInOutBack curve begin min-size' , (WidgetTester tester) async {
1009
+ const Key stackKey = ValueKey <String >('stack' );
1010
+ const Key containerKey = ValueKey <String >('container' );
1011
+ final DraggableScrollableController controller = DraggableScrollableController ();
1012
+ await tester.pumpWidget (boilerplateWidget (
1013
+ null ,
1014
+ initialChildSize: 0.25 ,
1015
+ controller: controller,
1016
+ stackKey: stackKey,
1017
+ containerKey: containerKey,
1018
+ ));
1019
+ await tester.pumpAndSettle ();
1020
+ final double screenHeight = tester.getSize (find.byKey (stackKey)).height;
1021
+
1022
+ controller.animateTo (.6 , curve: Curves .easeInOutBack, duration: const Duration (milliseconds: 500 ));
1023
+
1024
+ await tester.pumpAndSettle ();
1025
+ expect (
1026
+ tester.getSize (find.byKey (containerKey)).height / screenHeight,
1027
+ closeTo (.6 , precisionErrorTolerance),
1028
+ );
1029
+ });
1030
+
1010
1031
testWidgets ('Can reuse a controller after the old controller is disposed' , (WidgetTester tester) async {
1011
1032
const Key stackKey = ValueKey <String >('stack' );
1012
1033
const Key containerKey = ValueKey <String >('container' );
0 commit comments