diff --git a/packages/animations/CHANGELOG.md b/packages/animations/CHANGELOG.md index 208823ee162..017910cbca3 100644 --- a/packages/animations/CHANGELOG.md +++ b/packages/animations/CHANGELOG.md @@ -1,6 +1,7 @@ -## NEXT +## 2.0.9 -* Updates minimum supported SDK version to Flutter 3.10/Dart 3.0. +* Updates minimum supported SDK version to Flutter 3.13/Dart 3.1. +* Migrate motion curves to use `Easing` class. ## 2.0.8 @@ -28,7 +29,7 @@ * Updates for non-nullable bindings. ## 2.0.2 -* Fixed documentation for `OpenContainer` class; replaced `openBuilder` with `closedBuilder`. +* Fixed documentation for `OpenContainer` class; replaced `openBuilder` with `closedBuilder`. ## 2.0.1 * Add links to the spec and codelab. diff --git a/packages/animations/lib/src/fade_scale_transition.dart b/packages/animations/lib/src/fade_scale_transition.dart index a9108e03b75..44487e04260 100644 --- a/packages/animations/lib/src/fade_scale_transition.dart +++ b/packages/animations/lib/src/fade_scale_transition.dart @@ -134,7 +134,7 @@ class FadeScaleTransition extends StatelessWidget { static final Animatable _scaleInTransition = Tween( begin: 0.80, end: 1.00, - ).chain(CurveTween(curve: decelerateEasing)); + ).chain(CurveTween(curve: Easing.legacyDecelerate)); static final Animatable _fadeOutTransition = Tween( begin: 1.0, end: 0.0, diff --git a/packages/animations/lib/src/shared_axis_transition.dart b/packages/animations/lib/src/shared_axis_transition.dart index 9868e008cfc..3b3340c9871 100644 --- a/packages/animations/lib/src/shared_axis_transition.dart +++ b/packages/animations/lib/src/shared_axis_transition.dart @@ -303,18 +303,18 @@ class _EnterTransition extends StatelessWidget { final bool reverse; static final Animatable _fadeInTransition = CurveTween( - curve: decelerateEasing, + curve: Easing.legacyDecelerate, ).chain(CurveTween(curve: const Interval(0.3, 1.0))); static final Animatable _scaleDownTransition = Tween( begin: 1.10, end: 1.00, - ).chain(CurveTween(curve: standardEasing)); + ).chain(CurveTween(curve: Easing.legacy)); static final Animatable _scaleUpTransition = Tween( begin: 0.80, end: 1.00, - ).chain(CurveTween(curve: standardEasing)); + ).chain(CurveTween(curve: Easing.legacy)); @override Widget build(BuildContext context) { @@ -323,7 +323,7 @@ class _EnterTransition extends StatelessWidget { final Animatable slideInTransition = Tween( begin: Offset(!reverse ? 30.0 : -30.0, 0.0), end: Offset.zero, - ).chain(CurveTween(curve: standardEasing)); + ).chain(CurveTween(curve: Easing.legacy)); return FadeTransition( opacity: _fadeInTransition.animate(animation), @@ -342,7 +342,7 @@ class _EnterTransition extends StatelessWidget { final Animatable slideInTransition = Tween( begin: Offset(0.0, !reverse ? 30.0 : -30.0), end: Offset.zero, - ).chain(CurveTween(curve: standardEasing)); + ).chain(CurveTween(curve: Easing.legacy)); return FadeTransition( opacity: _fadeInTransition.animate(animation), @@ -386,18 +386,18 @@ class _ExitTransition extends StatelessWidget { final Widget? child; static final Animatable _fadeOutTransition = _FlippedCurveTween( - curve: accelerateEasing, + curve: Easing.legacyAccelerate, ).chain(CurveTween(curve: const Interval(0.0, 0.3))); static final Animatable _scaleUpTransition = Tween( begin: 1.00, end: 1.10, - ).chain(CurveTween(curve: standardEasing)); + ).chain(CurveTween(curve: Easing.legacy)); static final Animatable _scaleDownTransition = Tween( begin: 1.00, end: 0.80, - ).chain(CurveTween(curve: standardEasing)); + ).chain(CurveTween(curve: Easing.legacy)); @override Widget build(BuildContext context) { @@ -406,7 +406,7 @@ class _ExitTransition extends StatelessWidget { final Animatable slideOutTransition = Tween( begin: Offset.zero, end: Offset(!reverse ? -30.0 : 30.0, 0.0), - ).chain(CurveTween(curve: standardEasing)); + ).chain(CurveTween(curve: Easing.legacy)); return FadeTransition( opacity: _fadeOutTransition.animate(animation), @@ -428,7 +428,7 @@ class _ExitTransition extends StatelessWidget { final Animatable slideOutTransition = Tween( begin: Offset.zero, end: Offset(0.0, !reverse ? -30.0 : 30.0), - ).chain(CurveTween(curve: standardEasing)); + ).chain(CurveTween(curve: Easing.legacy)); return FadeTransition( opacity: _fadeOutTransition.animate(animation), diff --git a/packages/animations/pubspec.yaml b/packages/animations/pubspec.yaml index 461fe253804..8d86e06c233 100644 --- a/packages/animations/pubspec.yaml +++ b/packages/animations/pubspec.yaml @@ -2,11 +2,11 @@ name: animations description: Fancy pre-built animations that can easily be integrated into any Flutter application. repository: https://github.com/flutter/packages/tree/main/packages/animations issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+animations%22 -version: 2.0.8 +version: 2.0.9 environment: - sdk: ">=3.0.0 <4.0.0" - flutter: ">=3.10.0" + sdk: ">=3.1.0 <4.0.0" + flutter: ">=3.13.0" dependencies: flutter: