Skip to content

Add animation curve slowMiddle#28540

Merged
dkwingsmt merged 4 commits intoflutter:masterfrom
dkwingsmt:curve-fifo
Mar 1, 2019
Merged

Add animation curve slowMiddle#28540
dkwingsmt merged 4 commits intoflutter:masterfrom
dkwingsmt:curve-fifo

Conversation

@dkwingsmt
Copy link
Contributor

@dkwingsmt dkwingsmt commented Feb 27, 2019

Description

  • Added a new animation curve fastInFastOutslowMiddle per requested in Add an animation curve that is straight in the middle #26743. It starts quickly, flats out when near the center, and ends quickly.
    • It's named so because we also have fastOutSlowIn. Another option is stallCenter, which is a new format but maybe clearer. See discussion below
    • Currently it's Cubic(0.15, 0.85, 0.85, 0.15), as shown below.
      1
    • I intentionally chose slower slopes at the start and end because otherwise the start and end animation will be barely visible.
  • Fixed a few typos in doc.
  • TODO:
    • Add assets-for-api-docs
  • Subject to discussion:
    • Name
    • Tweek numbers

Related Issues

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes tests for all changed/updated/fixed behaviors (See Test Coverage).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

@dkwingsmt dkwingsmt self-assigned this Feb 27, 2019
@gspencergoog
Copy link
Contributor

gspencergoog commented Feb 27, 2019

Hmm. I like "stallCenter", "stallMiddle", "slowCenter" or maybe "slowMiddle" better as a name. "fastInFastOut" sounds like it's just fast all the time.

You'll need to create the assets-for-api-docs content before you commit this, since otherwise the link will be broken in the API docs. You'll want to add your new curve here, and then run the asset generator with this PR to generate the curve animation.

Thank you for fixing the extra "and"s in the docs!

@gspencergoog
Copy link
Contributor

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@dkwingsmt
Copy link
Contributor Author

dkwingsmt commented Feb 27, 2019

@gspencergoog Thanks! I'll submit a PR for assets after we settled the name and numbers here. slowMiddle is also a good option!

@zoechi zoechi added c: new feature Nothing broken; request for a new capability a: animation Animation APIs framework flutter/packages/flutter repository. See also f: labels. labels Feb 27, 2019
@gspencergoog
Copy link
Contributor

Actually, I was thinking about it, and I think it should be slowMiddle, since "center" kind of implies something geometric, and although the curve itself it geometric, an animation has a "middle" (like a music composition), more than it has a "center" (like a geometric object).

@dkwingsmt
Copy link
Contributor Author

@gspencergoog Sure. What about the numbers, are they ok?

@dkwingsmt
Copy link
Contributor Author

Also it seems I need to merge this before the asset PR, otherwise the CI for the asset PR would fail.

@dkwingsmt dkwingsmt changed the title Add animation curve fastInFastOut Add animation curve slowMiddle Feb 28, 2019
@gspencergoog
Copy link
Contributor

The numbers seem fine.

@dkwingsmt dkwingsmt merged commit 2a046aa into flutter:master Mar 1, 2019
@dkwingsmt dkwingsmt deleted the curve-fifo branch March 1, 2019 22:55
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

a: animation Animation APIs c: new feature Nothing broken; request for a new capability framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an animation curve that is straight in the middle

4 participants