Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/content/cookbook/animation/physics-simulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This recipe uses these steps:
1. Set up an animation controller
2. Move the widget using gestures
3. Animate the widget
4. Calculate the velocity to simulate a springing motion
4. Calculate the velocity to simulate a spring motion


## Step 1: Set up an animation controller
Expand Down Expand Up @@ -223,10 +223,9 @@ Finally, update the `GestureDetector` to manage the animation controller:
child: Align(
```

## Step 4: Calculate the velocity to simulate a springing motion
## Step 4: Calculate the velocity to simulate a spring motion

The last step is to do a little math, to calculate the velocity of the widget
after it's finished being dragged. This is so that the widget realistically
The last step is to do a little math to calculate the widget's velocity after it finishes being dragged. This is so that the widget realistically
continues at that speed before being snapped back. (The `_runAnimation` method
already sets the direction by setting the animation's start and end alignment.)

Expand Down Expand Up @@ -279,8 +278,7 @@ onPanEnd: (details) {
```

:::note
Now that the animation controller uses a simulation it's `duration` argument
is no longer required.
Now that the animation controller uses a simulation, its `duration` argument is no longer required.
:::

## Interactive Example
Expand Down