Skip to content

Commit 801a264

Browse files
authored
Document where Curves curves correspond to CSS easing functions (flutter#137318)
1 parent 18812ff commit 801a264

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/flutter/lib/src/animation/curves.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,11 +1411,15 @@ abstract final class Curves {
14111411

14121412
/// A cubic animation curve that speeds up quickly and ends slowly.
14131413
///
1414+
/// This is the same as the CSS easing function `ease`.
1415+
///
14141416
/// {@animation 464 192 https://flutter.github.io/assets-for-api-docs/assets/animation/curve_ease.mp4}
14151417
static const Cubic ease = Cubic(0.25, 0.1, 0.25, 1.0);
14161418

14171419
/// A cubic animation curve that starts slowly and ends quickly.
14181420
///
1421+
/// This is the same as the CSS easing function `ease-in`.
1422+
///
14191423
/// {@animation 464 192 https://flutter.github.io/assets-for-api-docs/assets/animation/curve_ease_in.mp4}
14201424
static const Cubic easeIn = Cubic(0.42, 0.0, 1.0, 1.0);
14211425

@@ -1517,6 +1521,8 @@ abstract final class Curves {
15171521

15181522
/// A cubic animation curve that starts quickly and ends slowly.
15191523
///
1524+
/// This is the same as the CSS easing function `ease-out`.
1525+
///
15201526
/// {@animation 464 192 https://flutter.github.io/assets-for-api-docs/assets/animation/curve_ease_out.mp4}
15211527
static const Cubic easeOut = Cubic(0.0, 0.0, 0.58, 1.0);
15221528

@@ -1618,6 +1624,8 @@ abstract final class Curves {
16181624
/// A cubic animation curve that starts slowly, speeds up, and then ends
16191625
/// slowly.
16201626
///
1627+
/// This is the same as the CSS easing function `ease-in-out`.
1628+
///
16211629
/// {@animation 464 192 https://flutter.github.io/assets-for-api-docs/assets/animation/curve_ease_in_out.mp4}
16221630
static const Cubic easeInOut = Cubic(0.42, 0.0, 0.58, 1.0);
16231631

0 commit comments

Comments
 (0)