Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/animations/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.0.9

* Migrate motion curves to use `Easing` class.

## 2.0.8

* Adds pub topics to package metadata.
Expand All @@ -24,7 +28,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.
Expand Down
2 changes: 1 addition & 1 deletion packages/animations/lib/src/fade_scale_transition.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class FadeScaleTransition extends StatelessWidget {
static final Animatable<double> _scaleInTransition = Tween<double>(
begin: 0.80,
end: 1.00,
).chain(CurveTween(curve: decelerateEasing));
).chain(CurveTween(curve: Easing.legacyDecelerate));
static final Animatable<double> _fadeOutTransition = Tween<double>(
begin: 1.0,
end: 0.0,
Expand Down
20 changes: 10 additions & 10 deletions packages/animations/lib/src/shared_axis_transition.dart
Original file line number Diff line number Diff line change
Expand Up @@ -303,18 +303,18 @@ class _EnterTransition extends StatelessWidget {
final bool reverse;

static final Animatable<double> _fadeInTransition = CurveTween(
curve: decelerateEasing,
curve: Easing.legacyDecelerate,
).chain(CurveTween(curve: const Interval(0.3, 1.0)));

static final Animatable<double> _scaleDownTransition = Tween<double>(
begin: 1.10,
end: 1.00,
).chain(CurveTween(curve: standardEasing));
).chain(CurveTween(curve: Easing.legacy));

static final Animatable<double> _scaleUpTransition = Tween<double>(
begin: 0.80,
end: 1.00,
).chain(CurveTween(curve: standardEasing));
).chain(CurveTween(curve: Easing.legacy));

@override
Widget build(BuildContext context) {
Expand All @@ -323,7 +323,7 @@ class _EnterTransition extends StatelessWidget {
final Animatable<Offset> slideInTransition = Tween<Offset>(
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),
Expand All @@ -342,7 +342,7 @@ class _EnterTransition extends StatelessWidget {
final Animatable<Offset> slideInTransition = Tween<Offset>(
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),
Expand Down Expand Up @@ -386,18 +386,18 @@ class _ExitTransition extends StatelessWidget {
final Widget? child;

static final Animatable<double> _fadeOutTransition = _FlippedCurveTween(
curve: accelerateEasing,
curve: Easing.legacyAccelerate,
).chain(CurveTween(curve: const Interval(0.0, 0.3)));

static final Animatable<double> _scaleUpTransition = Tween<double>(
begin: 1.00,
end: 1.10,
).chain(CurveTween(curve: standardEasing));
).chain(CurveTween(curve: Easing.legacy));

static final Animatable<double> _scaleDownTransition = Tween<double>(
begin: 1.00,
end: 0.80,
).chain(CurveTween(curve: standardEasing));
).chain(CurveTween(curve: Easing.legacy));

@override
Widget build(BuildContext context) {
Expand All @@ -406,7 +406,7 @@ class _ExitTransition extends StatelessWidget {
final Animatable<Offset> slideOutTransition = Tween<Offset>(
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),
Expand All @@ -428,7 +428,7 @@ class _ExitTransition extends StatelessWidget {
final Animatable<Offset> slideOutTransition = Tween<Offset>(
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),
Expand Down
6 changes: 3 additions & 3 deletions packages/animations/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: ">=2.19.0 <4.0.0"
flutter: ">=3.7.0"
sdk: ">=3.1.0 <4.0.0"
flutter: ">=3.13.0"

dependencies:
flutter:
Expand Down