Repository navigation
Make CurveTween curve a regular parameter #21433
Description
Activity
- addedc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.a: animationAnimation APIsAnimation APIs
on Sep 5, 2018 I agree that this would make sense, but unfortunately it would be a breaking change, so it's probably too late to really make this change.
FWIW, the original thinking here was that we might add a "reverseCurve" argument, similar to how CurvedAnimation works. We haven't done that yet but it's still possible that we should one day do that.
I guess if you really need a
reverseCurveit would make sense to create a separate tween class that requires two curves.Would a (small) breaking change be a problem? After all Flutter is still in beta.
The problem isn't one small breaking change, it's 1,001 small breaking changes. If we make this change, we'd also have to make a thousand other breaking changes of the same nature, and eventually everyone would be spending all their time just handling our breaking changes.
- addedc: API breakBackwards-incompatible API changesBackwards-incompatible API changes
on Jan 3, 2019 This should be possible now that we have
dart fix...- addedP3Issues that are less important to the Flutter projectIssues that are less important to the Flutter project
on Feb 21, 2023 - addedteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
on Jul 8, 2023 Should this be closed now that we have dot shorthands? (#166012 (review))
Edit: No, the code sample in the linked comment isn't (currently) supported since
CurveandCurvesare completely distinct to Dart.
Right now the
CurveTweenconstructor looks like this:Usage currently looks like this:
There is a single required parameter, and I think it's quite certain that a
CurveTweenneeds aCurveto function.I propose to make it a regular parameter to make usage easier and a bit more fail-safe:
If this is approved by the Flutter team, I will create a PR.