Skip to content

*Breaking change* Deprecate CurvedAnimation.reverseCurve in favor of AsymmetricCurvedAnimation#13347

Draft
adil192 wants to merge 6 commits into
flutter:mainfrom
adil192:breaking-changes/deprecate-curved-animation-reverse-curve
Draft

*Breaking change* Deprecate CurvedAnimation.reverseCurve in favor of AsymmetricCurvedAnimation#13347
adil192 wants to merge 6 commits into
flutter:mainfrom
adil192:breaking-changes/deprecate-curved-animation-reverse-curve

Conversation

@adil192
Copy link
Copy Markdown

@adil192 adil192 commented May 3, 2026

Description of what this PR is changing or adding, and why:

Adds a migration guide for a breaking change in flutter/flutter#185797.

PRs or commits this PR depends on (if any):

Presubmit checklist

  • If you are unwilling, or unable, to sign the CLA, even for a tiny, one-word PR, please file an issue instead of a PR.
  • If this PR is not meant to land until a future stable release, mark it as draft with an explanation.
  • This PR follows the Google Developer Documentation Style Guidelines—for example, it doesn't use i.e. or e.g., and it avoids I and we (first-person pronouns).
  • This PR uses semantic line breaks
    of 80 characters or fewer.

@adil192 adil192 force-pushed the breaking-changes/deprecate-curved-animation-reverse-curve branch from b0943d1 to f17a81a Compare May 5, 2026 23:28
@loic-sharma loic-sharma self-requested a review May 5, 2026 23:42
…ed-animation-reverse-curve.md

Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
@sfshaza2
Copy link
Copy Markdown
Contributor

sfshaza2 commented May 6, 2026

/gcbrun

@flutter-website-bot
Copy link
Copy Markdown
Collaborator

flutter-website-bot commented May 6, 2026

Visit the preview URL for this PR (updated for commit 2321bc7):

https://flutter-docs-prod--pr13347-breaking-changes-deprecate-ftgcwv6g.web.app

@sfshaza2
Copy link
Copy Markdown
Contributor

sfshaza2 commented May 7, 2026

@adil192, can we land this? If so, please remove from draft model.

@adil192
Copy link
Copy Markdown
Author

adil192 commented May 8, 2026

@sfshaza2 Don't we need to wait until flutter/flutter#185797 lands?

@loic-sharma Do we have a deprecation window to put in the Timeline section?

adil192 and others added 2 commits June 5, 2026 21:44
Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
@adil192 adil192 marked this pull request as ready for review June 5, 2026 20:50
@adil192 adil192 requested review from a team and sfshaza2 as code owners June 5, 2026 20:50
@adil192 adil192 marked this pull request as draft June 5, 2026 20:50
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds documentation for the deprecation of CurvedAnimation.reverseCurve in favor of AsymmetricCurvedAnimation and registers this new breaking change in the index. The review feedback focuses on correcting several API documentation link references where links meant for CurvedAnimation (such as reverseCurve and dispose) incorrectly point to AsymmetricCurvedAnimation. It also addresses a line length limit violation and suggests adding the missing reference link definitions.


## Summary

[`CurvedAnimation`][]'s [`reverseCurve`][] field has been deprecated.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The link [reverseCurve][] currently points to AsymmetricCurvedAnimation/reverseCurve.html. Since this sentence refers to the deprecated field on CurvedAnimation, it should point to CurvedAnimation/reverseCurve.html instead. We can define a specific reference link [CurvedAnimation.reverseCurve] at the bottom of the file and use it here.

Suggested change
[`CurvedAnimation`][]'s [`reverseCurve`][] field has been deprecated.
[`CurvedAnimation`][]'s [`reverseCurve`][CurvedAnimation.reverseCurve] field has been deprecated.


## Background

To support its [`reverseCurve`][] functionality,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The link [reverseCurve][] here refers to the functionality of CurvedAnimation, so it should point to CurvedAnimation/reverseCurve.html instead of AsymmetricCurvedAnimation/reverseCurve.html.

Suggested change
To support its [`reverseCurve`][] functionality,
To support its [`reverseCurve`][CurvedAnimation.reverseCurve] functionality,

Comment on lines +37 to +39
Until the deprecation period is over, you must continue to
call [`dispose`][] on [`CurvedAnimation`]. If you switch to [`AsymmetricCurvedAnimation`][], you must always call its
[`dispose`][] method to clean up its active direction listeners.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This line exceeds the 80-character limit for semantic line breaks (it is 114 characters long). Additionally, the first [dispose][] link refers to calling dispose on CurvedAnimation, so it should point to CurvedAnimation/dispose.html instead of AsymmetricCurvedAnimation/dispose.html.

Let's wrap the text to adhere to semantic line breaks and use the correct link reference.

Suggested change
Until the deprecation period is over, you must continue to
call [`dispose`][] on [`CurvedAnimation`]. If you switch to [`AsymmetricCurvedAnimation`][], you must always call its
[`dispose`][] method to clean up its active direction listeners.
Until the deprecation period is over, you must continue to
call [`dispose`][CurvedAnimation.dispose] on [`CurvedAnimation`].
If you switch to [`AsymmetricCurvedAnimation`][],
you must always call its [`dispose`][] method
to clean up its active direction listeners.


## Migration guide

If you need [`CurvedAnimation`][]'s [`reverseCurve`][] field,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The link [reverseCurve][] here refers to CurvedAnimation's field, so it should point to CurvedAnimation/reverseCurve.html.

Suggested change
If you need [`CurvedAnimation`][]'s [`reverseCurve`][] field,
If you need [`CurvedAnimation`][]'s [`reverseCurve`][CurvedAnimation.reverseCurve] field,

Comment on lines +106 to +108
[`dispose`]: {{site.main-api}}/flutter/animation/AsymmetricCurvedAnimation/dispose.html
[`parent`]: {{site.main-api}}/flutter/animation/CurvedAnimation/parent.html
[`reverseCurve`]: {{site.main-api}}/flutter/animation/AsymmetricCurvedAnimation/reverseCurve.html
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Add the new reference link definitions for CurvedAnimation.dispose and CurvedAnimation.reverseCurve to ensure the links resolve correctly.

Suggested change
[`dispose`]: {{site.main-api}}/flutter/animation/AsymmetricCurvedAnimation/dispose.html
[`parent`]: {{site.main-api}}/flutter/animation/CurvedAnimation/parent.html
[`reverseCurve`]: {{site.main-api}}/flutter/animation/AsymmetricCurvedAnimation/reverseCurve.html
[CurvedAnimation.dispose]: {{site.main-api}}/flutter/animation/CurvedAnimation/dispose.html
[CurvedAnimation.reverseCurve]: {{site.main-api}}/flutter/animation/CurvedAnimation/reverseCurve.html
[`dispose`]: {{site.main-api}}/flutter/animation/AsymmetricCurvedAnimation/dispose.html
[`parent`]: {{site.main-api}}/flutter/animation/CurvedAnimation/parent.html
[`reverseCurve`]: {{site.main-api}}/flutter/animation/AsymmetricCurvedAnimation/reverseCurve.html

@flutter-website-bot
Copy link
Copy Markdown
Collaborator

Staged preview of the updated docs.flutter.dev site (updated for commit ce8adfe):

https://flutter-docs-prod--docs-pr13347-breaking-changes-depre-s7gn3urm.web.app

@flutter flutter deleted a comment from flutter-website-bot Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants