Skip to content

Commit

Permalink
Add how to animate the viewport
Browse files Browse the repository at this point in the history
  • Loading branch information
fujidaiti authored Apr 15, 2023
1 parent 6a9a728 commit f2d249d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Here is an example of what you can do with this widget: ([Youtube](https://youtu
- [3. Use `onViewportChanged` callback](#3-use-onviewportchanged-callback)
- [add space between pages?](#add-space-between-pages)
- [prevent my AppBar going off the screen when `overshootEffect` is true?](#prevent-my-appbar-going-off-the-screen-when-overshooteffect-is-true)
- [animate the viewport state?](#animate-the-viewport-state)
- [Questions](#questions)
- [Contributing](#contributing)

Expand Down Expand Up @@ -329,6 +330,17 @@ Container(
);
```

### animate the viewport state?

Use `ExprollablePageController.animateViewportOffsetTo`.

```dart
controller.animateViewportOffsetTo(
ViewportOffset.shrunk,
curve: Curves.easeInOutSine,
duration: Duration(seconds: 1),
);
```


## Questions
Expand Down

0 comments on commit f2d249d

Please sign in to comment.