*Breaking change* Deprecate CurvedAnimation.reverseCurve in favor of AsymmetricCurvedAnimation#13347
Conversation
…f `AsymmetricCurvedAnimation`
b0943d1 to
f17a81a
Compare
…ed-animation-reverse-curve.md Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
|
/gcbrun |
|
Visit the preview URL for this PR (updated for commit 2321bc7): https://flutter-docs-prod--pr13347-breaking-changes-deprecate-ftgcwv6g.web.app |
|
@adil192, can we land this? If so, please remove from draft model. |
|
@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? |
Co-authored-by: Loïc Sharma <737941+loic-sharma@users.noreply.github.com>
…precate-curved-animation-reverse-curve
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
| [`CurvedAnimation`][]'s [`reverseCurve`][] field has been deprecated. | |
| [`CurvedAnimation`][]'s [`reverseCurve`][CurvedAnimation.reverseCurve] field has been deprecated. |
|
|
||
| ## Background | ||
|
|
||
| To support its [`reverseCurve`][] functionality, |
There was a problem hiding this comment.
The link [reverseCurve][] here refers to the functionality of CurvedAnimation, so it should point to CurvedAnimation/reverseCurve.html instead of AsymmetricCurvedAnimation/reverseCurve.html.
| To support its [`reverseCurve`][] functionality, | |
| To support its [`reverseCurve`][CurvedAnimation.reverseCurve] functionality, |
| 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. |
There was a problem hiding this comment.
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.
| 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, |
There was a problem hiding this comment.
| [`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 |
There was a problem hiding this comment.
Add the new reference link definitions for CurvedAnimation.dispose and CurvedAnimation.reverseCurve to ensure the links resolve correctly.
| [`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 |
|
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 |
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):
CurvedAnimation.reverseCurveforAsymmetricCurvedAnimationflutter#185797Presubmit checklist
of 80 characters or fewer.