Skip to content

Commit

Permalink
Bumped version 0.4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
letsar committed Oct 5, 2018
1 parent 82a9b52 commit c090141
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.8
### Addded
* onSlideAnimationChanged and onSlideIsOpenChanged on `SlidableController`.

## 0.4.7
### Fixed
* https://github.com/letsar/flutter_slidable/issues/31 (Issue with dismiss animation).
Expand Down
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ In the `pubspec.yaml` of your flutter project, add the following dependency:
```yaml
dependencies:
...
flutter_slidable: "^0.4.7"
flutter_slidable: "^0.4.8"
```
In your library add the following import:
Expand Down Expand Up @@ -233,7 +233,32 @@ new Slidable(
controller: slidableController,
...
);
```
```

#### How can I animate an external widget at the same time as the active Slidable?

You have to set the callbacks of a `SlidableController` instance:
The `onSlideAnimationChanged` let you get the animation of the current Slidable.
The `onSlideIsOpenChanged` let you know when the current Slidable opens and closes.

```dart
final SlidableController slidableController = new SlidableController(
onSlideAnimationChanged: handleSlideAnimationChanged,
onSlideIsOpenChanged: handleSlideIsOpenChanged,
);
...
void handleSlideAnimationChanged(Animation<double> slideAnimation) {
setState(() {
_rotationAnimation = slideAnimation;
});
}
void handleSlideIsOpenChanged(bool isOpen) {
setState(() {
_fabColor = isOpen ? Colors.green : Colors.blue;
});
}
```

## Changelog

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_slidable
description: A Flutter implementation of slidable list item with directional slide actions that can be dismissed.
version: 0.4.7
version: 0.4.8
author: Romain Rastel <[email protected]>
homepage: https://github.com/letsar/flutter_slidable

Expand Down

0 comments on commit c090141

Please sign in to comment.