Dispose temporarily created CurvedAnimation [prod-leak-fix] (#157233)
This commit is contained in:
committed by
GitHub
parent
effaeee603
commit
6d3167e025
@@ -437,12 +437,15 @@ class CupertinoPageTransition extends StatefulWidget {
|
||||
///
|
||||
/// {@macro flutter.widgets.delegatedTransition}
|
||||
static Widget? delegatedTransition(BuildContext context, Animation<double> animation, Animation<double> secondaryAnimation, bool allowSnapshotting, Widget? child) {
|
||||
final Animation<Offset> delegatedPositionAnimation =
|
||||
CurvedAnimation(
|
||||
final CurvedAnimation animation = CurvedAnimation(
|
||||
parent: secondaryAnimation,
|
||||
curve: Curves.linearToEaseOut,
|
||||
reverseCurve: Curves.easeInToLinear,
|
||||
).drive(_kMiddleLeftTween);
|
||||
);
|
||||
final Animation<Offset> delegatedPositionAnimation =
|
||||
animation.drive(_kMiddleLeftTween);
|
||||
animation.dispose();
|
||||
|
||||
assert(debugCheckHasDirectionality(context));
|
||||
final TextDirection textDirection = Directionality.of(context);
|
||||
return SlideTransition(
|
||||
|
||||
Reference in New Issue
Block a user